-
-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyplot image cut off #220
Comments
Well it's certainly there for a reason! I don't know if it should be uncommented... I think the reason I took it out is because it semi-arbitrarily changed the size of the plot, and I wasn't happy about it. I think the better solution is to allow for better fine-tuning of the commands. This is sort of related to the request for a DPI keyword (#173). I'm open to suggestions, but I want to avoid solutions that are too hacky. |
And of course... you can always just run those commands yourself with the bbox_inches included if you're desperate... |
I'm with you on semi-arbitrarily changing the size of the plot not being ideal. One could argue that it's on the user to not place annotations that run off the edge of the figure canvas anyway. The problem is that the behaviour is inconsistent between backends: in PlotlyJS the axes are resized automatically to hold the annotation, in Gadfly you have to manually adjust the axis limits to see the annotation, and in matplotlib you can either do that or use subplots_adjust to add white space without extending the axes - but then we run into the issue of needing to save it with |
one more thing... you can set the horizontal and vertical alignment pretty easily. in this case you might want your annotations to be |
In "Plots 0.7" you can do something like:
|
Thanks Tom, that's awesome! |
Are there any other solutions based on updated Julia? |
|
fix violin number of series
Plots.savefig
is cutting off some annotations which run off the edge of the axes, even when the figure is adjusted withPyPlot.subplots_adjust
.In matplotlib I'd add
bbox_inches="tight"
to the savefig command to fix this. Should this line be uncommented? https://github.com/tbreloff/Plots.jl/blob/3c09921cbd4da44b36fb5a6ed03e0a528d0e38f8/src/backends/pyplot.jl#L1113The text was updated successfully, but these errors were encountered: