guillermo-navas-palencia / optbinning

Optimal binning: monotonic binning with constraints. Support batch & stream optimal binning. Scorecard modelling and counterfactual explanations.
http://gnpalencia.org/optbinning/
Apache License 2.0
459 stars 100 forks source link

Axis labels are cut off when saving the table plot to a file #303

Closed josp70 closed 8 months ago

josp70 commented 8 months ago

We are generating chart in files but the axis labels are cut off in the generated files.

If we pass bbox_inches='tight' in the call to plt.savefig then the rendered labels are not cut off.

As a more general fix we can modify the method BinningTable.plot and redefined method in derived classes to accept a dictionary argument save_kwargs to be expanded in the call to plt.savefig

josp70 commented 8 months ago

A pull request has been proposed for this feature: #304

guillermo-navas-palencia commented 8 months ago

Thanks, I closed this issue since there is a PR fixing it.