You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a figure with an image using imshow() and saved it as SVG. I realized that the saved image gets upside down when svg.image_noscale is True.
I'm using matplotlib == 1.2.0 on Mac OS X.
The following code reproduces the issue.
importmatplotlib.pyplotaspltimportnumpyasnp# Use default configuration.plt.matplotlib.rcdefaults()
# Create a figure.fig=plt.figure()
ax=fig.add_subplot(111)
X, Y=np.meshgrid(np.arange(-5, 5, 1), np.arange(-5, 5, 1))
Z=np.sin(Y**2)
ax.imshow(Z, cmap='gray')
# These are ok.fig.savefig('ok.png')
fig.savefig('ok.svg')
# Set `svg.image_noscale` to True.plt.rcParams['svg.image_noscale'] =True# Then, the image is upside down.fig.savefig('bad.svg')
Thanks,
The text was updated successfully, but these errors were encountered:
I created a figure with an image using
imshow()
and saved it as SVG. I realized that the saved image gets upside down whensvg.image_noscale
is True.I'm using matplotlib == 1.2.0 on Mac OS X.
The following code reproduces the issue.
Thanks,
The text was updated successfully, but these errors were encountered: