Saving images corrupts x and y tick labels #3154
Replies: 3 comments
-
Bear in mind the documentation for
What you're doing is creating a figure anad axes, then passing the figure to The solution is either (a) initialize only the figure with pyplot (with PS if your only goal here is to save a png and you aren't doing any other post-processing, why bother with pyplot when you could use |
Beta Was this translation helpful? Give feedback.
-
I didn't know that My goal is to export the image and this is the process that I've always used for matplotlib derived tooling (previous Seaborn, Pandas, Yellowbrick, scikit-plot, shap, scikit-learn, etc). I wouldn't expect saving the figure to mess anything up if there was an existing axes. I will use |
Beta Was this translation helpful? Give feedback.
-
Right, saving the figure isn't messing anything up. Remove the save bit and you will see that it's all due to which object you give
Why make it more complicated than necessary though? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to create some Seaborn plots for an upcoming book and the x/y tick values are getting corrupted when saving it as a PNG.
Using version 0.12.1.
The result looks like this:
However, if I remove the saving logic....
The plot looks like this:
Beta Was this translation helpful? Give feedback.
All reactions