-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fig.savefig alters the dimensions of the figure #10560
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
Comments
@ataiya Thanks for opening an issue ticket. This problem might have been fixed by #10292 , that is in Matplotlib 2.2.0rc1 (IIRC). Would it be possible for you to test the release candidate, to see if the issue is fixed or not for you? Not totally sure about the proper command line for
If somebody else could confirm ^^. Edit: some French had made its way to the former version... |
This looks resolved at least since 78c484e |
Hi @afvincent Indeed, upgrading to the pre-release seems to have fixed the problem! Too bad a google search didn't return anything :( @afvincent |
@ataiya You're welcome. And don't worry, the bug report was appreciated. Hopefully we'll see more of them if you notice other Matplotlib issues in the future. Be aware that if Google is not returning matches, there is also a search engine on the GitHub tracker that could help you to look for similar problems among the issues and PRs. |
Bug report
Bug summary
fig.savefig(...) changes the size of the figure it is trying to save to file
minor note: problem doesn't occur when size_figure_inches<=5
Code for reproduction
Actual outcome
Below the images generated by test0 and test7


Expected outcome
Image size should not change.
Result can be achieved by setting FORCE_RESIZE_WINDOW=True in the code above.
The terminal output is then:
While the script reports 9.66in in height, note the outputted files are correctly 1000x1000 as shown below:


Matplotlib version
print(matplotlib.get_backend())
): TkAggThe text was updated successfully, but these errors were encountered: