Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

invalid EPS figure in Mac OS X #3523

Copy link
Copy link
Closed
Closed
Copy link
@bryan-woods

Description

@bryan-woods
Issue body actions

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.