Closed
Description
Bug report
Bug summary
savefig()
with type='png'
produces different image sizes, depending on the dpi
argument when calling figure()
.
Code for reproduction
from pylab import *
%matplotlib tk
plt.figure(figsize=(1,1),dpi=100)
plt.savefig("100-300dpi.png",type="png",dpi=300)
plt.figure(figsize=(1,1),dpi=96) #96 is my screen DPI
plt.savefig("96-300dpi.png",type="png",dpi=300)
Actual outcome
100-300dpi.png is 654x300 pixels.
96-300dpi.png is 681x300 pixels.
Expected outcome
I would expect both to come out at 300x300 pixels, or at least equal size.
Matplotlib version
- Matplotlib 2.0.0
- Python 2.7.13
- IPython 5.1.0
- Jupyter Version: 4.4.1
- Platform: Linux
Metadata
Metadata
Assignees
Labels
No labels