Closed
Description
I've upgraded to matplotlib 1.4.0 and am getting invalid EPS files (according to Preview) when I save figures that use
basemap (1.0.7). The same figure in PNG or PDF format works fine. I also saved a bar chart in EPS that worked.
I have verified that this happens in both OS X Mavericks and Mountain Lion. It doesn't matter whether I install using pip or homebrew. If I downgrade to matplotlib 1.3.1 it works fine.
Below is the code I was trying:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.basemap import Basemap
plt.figure()
m = Basemap(projection='npstere',lon_0=-270.,boundinglat=30.,round=True)
m.drawcoastlines(linewidth=1)
m.drawmapboundary(linewidth=1)
m.fillcontinents(color='silver')
m.drawmeridians(np.arange(-360,1,60))
m.drawparallels(np.arange(30,90,30))
plt.savefig('test.eps')
plt.savefig('test.pdf')
plt.savefig('test.png')
[TAC edited for formatting]
Metadata
Metadata
Assignees
Labels
No labels