Open
Description
Bug report
Closed #8542 and opened this slightly modified version which better illustrates the problem.
Bug summary
When using the TK backend, savefig()
with type='png'
produces different image sizes, depending on the dpi
argument when calling figure()
.
Code for reproduction
from pylab import *
%matplotlib tk
figsize = (10/3.0, 1)
plt.figure(figsize=figsize,dpi=100)
plt.savefig("100-300dpi.png",type="png",dpi=300)
plt.figure(figsize=figsize,dpi=96) #96 is my screen DPI
plt.savefig("96-300dpi.png",type="png",dpi=300)
Actual outcome
100-300dpi.png is 999x300 pixels.
96-300dpi.png is 1000x300 pixels.
Expected outcome
I would expect both to come out at 1000x300 pixels.
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