black background on rasterized quadmesh in ps output · Issue #2473 · matplotlib/matplotlib · GitHub
Skip to content

black background on rasterized quadmesh in ps output #2473

Description

@tacaswell

This reproduces the problem:

X, Y = meshgrid(linspace(0, 1, 2048), linspace(0, 1, 1024))
Y *= 2 + sin(linspace(0, 2*np.pi, 2048))
C = np.sin(X + Y)
pcolormesh(X, Y, C, rasterized=True)
gcf().savefig('test.eps')
gcf().savefig('test.png')

Saved as eps (converted the eps -> png for upload with inkscape)

test eps

saved as png (and matches screen):
test

My guess is that the agg layer renders the parts of the bounding box around the artist where the quad-mesh isn't as transparent and iirc postscript can't deal with the alpha channel. I hope this is an easy fix (change the background to (1, 1, 1, 0)?), but I don't know the guts of the rendering layer well enough to tell what to change.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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