@@ -683,17 +683,17 @@ def parallel_coordinates_cli(
683
683
curved_lines = curved_lines ,
684
684
)
685
685
typer .echo ("Progress: 75%" )
686
- if show_plot :
687
- plt .show ()
688
686
689
- echo_str_end = "."
690
687
if output_file is not None :
691
688
dpi = "figure" if save_dpi is None else save_dpi
692
689
plt .savefig (output_file , dpi = dpi )
693
- echo_str_end = f", output figure saved to { output_file } ."
694
- typer .echo ("Progress: 100%" )
690
+ typer .echo (f"Output figure saved to { output_file } ." )
695
691
696
- typer .echo ("Parallel coordinates plot completed" + echo_str_end )
692
+ if show_plot :
693
+ plt .show ()
694
+
695
+ typer .echo ("Progress: 100%" )
696
+ typer .echo ("Parallel coordinates plot completed" )
697
697
698
698
699
699
# PCA FOR RASTER DATA
@@ -3540,16 +3540,17 @@ def plot_roc_curve_cli(
3540
3540
3541
3541
_ = plot_roc_curve (y_true = y_true , y_prob = y_prob )
3542
3542
typer .echo ("Progress: 75%" )
3543
- if show_plot :
3544
- plt .show ()
3545
3543
3546
3544
if output_file is not None :
3547
3545
dpi = "figure" if save_dpi is None else save_dpi
3548
3546
plt .savefig (output_file , dpi = dpi )
3549
- echo_str_end = f", output figure saved to { output_file } ."
3550
- typer .echo ("Progress: 100% \n " )
3547
+ typer .echo (f"Output figure saved to { output_file } ." )
3551
3548
3552
- typer .echo ("ROC curve plot completed" + echo_str_end )
3549
+ if show_plot :
3550
+ plt .show ()
3551
+
3552
+ typer .echo ("Progress: 100%" )
3553
+ typer .echo ("ROC curve plot completed" )
3553
3554
3554
3555
3555
3556
@app .command ()
@@ -3580,16 +3581,17 @@ def plot_det_curve_cli(
3580
3581
3581
3582
_ = plot_det_curve (y_true = y_true , y_prob = y_prob )
3582
3583
typer .echo ("Progress: 75%" )
3583
- if show_plot :
3584
- plt .show ()
3585
3584
3586
3585
if output_file is not None :
3587
3586
dpi = "figure" if save_dpi is None else save_dpi
3588
3587
plt .savefig (output_file , dpi = dpi )
3589
- echo_str_end = f", output figure saved to { output_file } ."
3590
- typer .echo ("Progress: 100% \n " )
3588
+ typer .echo (f"Output figure saved to { output_file } ." )
3591
3589
3592
- typer .echo ("DET curve plot completed" + echo_str_end )
3590
+ if show_plot :
3591
+ plt .show ()
3592
+
3593
+ typer .echo ("Progress: 100%" )
3594
+ typer .echo ("DET curve plot completed" )
3593
3595
3594
3596
3595
3597
@app .command ()
@@ -3619,16 +3621,17 @@ def plot_precision_recall_curve_cli(
3619
3621
3620
3622
_ = plot_precision_recall_curve (y_true = y_true , y_prob = y_prob )
3621
3623
typer .echo ("Progress: 75%" )
3622
- if show_plot :
3623
- plt .show ()
3624
3624
3625
3625
if output_file is not None :
3626
3626
dpi = "figure" if save_dpi is None else save_dpi
3627
3627
plt .savefig (output_file , dpi = dpi )
3628
- echo_str_end = f", output figure saved to { output_file } ."
3629
- typer .echo ("Progress: 100% \n " )
3628
+ typer .echo (f"Output figure saved to { output_file } ." )
3630
3629
3631
- typer .echo ("Precision-Recall curve plot completed" + echo_str_end )
3630
+ if show_plot :
3631
+ plt .show ()
3632
+
3633
+ typer .echo ("Progress: 100%" )
3634
+ typer .echo ("Precision-Recall curve plot completed" )
3632
3635
3633
3636
3634
3637
@app .command ()
@@ -3658,16 +3661,17 @@ def plot_calibration_curve_cli(
3658
3661
3659
3662
_ = plot_calibration_curve (y_true = y_true , y_prob = y_prob , n_bins = n_bins )
3660
3663
typer .echo ("Progress: 75%" )
3661
- if show_plot :
3662
- plt .show ()
3663
3664
3664
3665
if output_file is not None :
3665
3666
dpi = "figure" if save_dpi is None else save_dpi
3666
3667
plt .savefig (output_file , dpi = dpi )
3667
- echo_str_end = f", output figure saved to { output_file } ."
3668
- typer .echo ("Progress: 100% \n " )
3668
+ typer .echo (f"Output figure saved to { output_file } ." )
3669
3669
3670
- typer .echo ("Calibration curve plot completed" + echo_str_end )
3670
+ if show_plot :
3671
+ plt .show ()
3672
+
3673
+ typer .echo ("Progress: 100%" )
3674
+ typer .echo ("Calibration curve plot completed" )
3671
3675
3672
3676
3673
3677
@app .command ()
@@ -3693,16 +3697,17 @@ def plot_confusion_matrix_cli(
3693
3697
matrix = confusion_matrix (y_true , y_pred )
3694
3698
_ = plot_confusion_matrix (confusion_matrix = matrix )
3695
3699
typer .echo ("Progress: 75%" )
3696
- if show_plot :
3697
- plt .show ()
3698
3700
3699
3701
if output_file is not None :
3700
3702
dpi = "figure" if save_dpi is None else save_dpi
3701
3703
plt .savefig (output_file , dpi = dpi )
3702
- echo_str_end = f", output figure saved to { output_file } ."
3703
- typer .echo ("Progress: 100% \n " )
3704
+ typer .echo (f"Output figure saved to { output_file } ." )
3704
3705
3705
- typer .echo ("Confusion matrix plot completed" + echo_str_end )
3706
+ if show_plot :
3707
+ plt .show ()
3708
+
3709
+ typer .echo ("Progress: 100%" )
3710
+ typer .echo ("Confusion matrix plot completed." )
3706
3711
3707
3712
3708
3713
@app .command ()
0 commit comments