Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

black background on rasterized quadmesh in ps output #2473

Closed
tacaswell opened this issue Sep 28, 2013 · 0 comments
Closed

black background on rasterized quadmesh in ps output #2473

tacaswell opened this issue Sep 28, 2013 · 0 comments
Milestone

Comments

@tacaswell
Copy link
Member

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.

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Sep 30, 2013
The change to the agg propagate to how `imsave` works so one test had
to be changed to account for the fact that pixels with alpha=0 are now
set to (1, 1, 1, 0) instead of (0, 0, 0, 0).
pelson added a commit that referenced this issue Oct 29, 2013
* upstream/v1.3.x:
  Update version to 1.3.1
  tiny correction of matplotlibrc.template
  minor docstring fix in dates.py
  Updated the docs of pyplot.gca.
  Fix #2472: Draw the spines on top of twin axes
  changes to c++ because gcc 4.8 seems to allow things the compiler on travis will not.
  added class variable `_fill_color` to RendererAgg to hold the color to use in `clear` calls to the render_base.
  patch to fix issue #2473.

Conflicts:
	lib/matplotlib/__init__.py
	lib/matplotlib/axes/_axes.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant