optbinning icon indicating copy to clipboard operation
optbinning copied to clipboard

Legend missing in ScorecardMonitoring.psi_plot()

Open gollolino opened this issue 7 months ago • 0 comments

When a PSI plot is generated using the function ScorecardMonitoring.psi_plot() the result is different, depdending on the choice of option savefig.

  • If the figure is displayed, e.g., in a jupyter notebook using the option savefig=None it contains a legend.
  • If the figure is saved to disk using the option savefig='Path/For/Figure.jpg' the legend is missing.

A fix I used was to set plt.tight_layout() before saving the plot to disk.

In my opinion it's desirable that both options for the function produce the same output. The variant with the legend is more illustrative.

gollolino avatar Jul 22 '24 12:07 gollolino