Skip to content

Hatching in EPS figures doesn't show up in Preview on MacOS X with Matplotlib 2.0 #8289

Closed
@astrofrog

Description

@astrofrog

Patches that have a hatch pattern in EPS plots don't show the hatch pattern when opened in Preview on MacOS X. This may be a Preview bug rather than a Matplotlib bug, but I wanted to check whether anything can be done on the Matplotlib side to avoid this (since the likelihood Apple will care about this issue is minimal). This was not a problem with Matplotlib 1.5, only with 2.0, so in that sense this is a regression.

To reproduce this:

from matplotlib import pyplot as plt
from matplotlib.patches import Ellipse

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ell = Ellipse((0.5, 0.5), 0.3, 0.4, 30, hatch='/', facecolor='none', edgecolor='black')
ax.add_patch(ell)
fig.savefig('test.eps')

PNG:

test

EPS, as viewed in Preview on MacOS X:

screen shot 2017-03-14 at 08 52 50

The above is with Matplotlib 2.0. With 1.5, Preview correctly shows the hatch pattern:

screen shot 2017-03-14 at 09 01 54

I'm using MacOS X 10.11.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions