Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Savefig shrinks image #8805

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

Closed
skjerns opened this issue Jun 26, 2017 · 3 comments
Closed

Savefig shrinks image #8805

skjerns opened this issue Jun 26, 2017 · 3 comments

Comments

@skjerns
Copy link

skjerns commented Jun 26, 2017

Bug report

Bug summary

When I save a figure my canvas is smaller as before. As I need to extract images from an interactive pyplot I cannot align them anymore afterwards.

Code for reproduction

import matplotlib.pyplot as plt
f = plt.Figure()
plt.plot([1,2,3])
f.savefig('test.png')

Actual outcome

Figure gets saved, figure shrinks. Subsequent figure is then a tiny bit smaller

Expected outcome

The figure gets saved, the canvas or figure size stays untouched.

Matplotlib version

  • Operating System: Win10 64
  • Matplotlib Version: 2.0.2
  • Python Version: 3.5.2
  • Spyder 3 using Qt5
@tacaswell
Copy link
Member

Suspect this is a duplicate of #8736

@skjerns
Copy link
Author

skjerns commented Jun 27, 2017

Indeed, the fix suggested in #8736 did fix the problem, but only if I do not set a costum DPI.

@tacaswell
Copy link
Member

closing in favor of #8736

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants