pycaret
pycaret copied to clipboard
[BUG]: axis title and legends are missing when saving plots from e.g. plot_model(best, plot='auc', save=True).
pycaret version checks
-
[x] I have checked that this issue has not already been reported here.
-
[X] I have confirmed this bug exists on the latest version of pycaret.
-
[X] I have confirmed this bug exists on the develop branch of pycaret (pip install -U git+https://github.com/pycaret/pycaret.git@develop).
Issue Description
Axis title and legends are missing when saving plots from e.g. plot_model(best, plot='auc', save=True) Can we save plots with axis title and legends in the future? Thanks!
Reproducible Example
# load dataset
from pycaret.datasets import get_data
diabetes = get_data('diabetes')
# init setup
from pycaret.classification import *
clf1 = setup(data = diabetes, target = 'Class variable')
# compare models
best = compare_models()
# plot
plot_model(best, plot='auc', save=True)
Expected Behavior
plots saved with axis title and legends
Actual Results
(as described above)
Installed Versions
pycaret.version 2.3.10
@wkuopt Can you pick this up please?
for developer of pycaret,I tried to solve the issue. before savefig,please run visualizer.finalize() to make sure the legends and and title can show in figure
visualizer.finalize() plt.savefig(fname=resultpath+'/AUC/'+f"{k}_AUC.png", bbox_inches="tight") visualizer.show(clear_figure=True)
I have the same problem and still can't solve it.
for developer of pycaret,I tried to solve the issue. before savefig,please run visualizer.finalize() to make sure the legends and and title can show in figure
visualizer.finalize() plt.savefig(fname=resultpath+'/AUC/'+f"{k}_AUC.png", bbox_inches="tight") visualizer.show(clear_figure=True)
@ZhaiCong Would you be willing to make a PR for this? Thanks!
Hi there,
I am new to pycaret and am running into the same issue described in this issue, are there any updates on how to ensure that the generated legend is visible in the saved figures or a a documented workaround? Thank you very much!