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

Composite images in PS to not respect axes background color #1895

Closed
mdboom opened this issue Apr 10, 2013 · 3 comments
Closed

Composite images in PS to not respect axes background color #1895

mdboom opened this issue Apr 10, 2013 · 3 comments

Comments

@mdboom
Copy link
Member

mdboom commented Apr 10, 2013

When multiple images are placed on an axes, a composite image is created containing all of them. Unfortunately, since PS does not support alpha, the background of the axes does not show through. The obvious choice is to turn off image compositing, however, make_image still expands each image to fill the entire axes, so only the topmost image will be visible. This will require some finagling, but it seems the thing to do is to stop non-composited images from taking up the entire axes.

@ghost ghost assigned mdboom Apr 10, 2013
@mdboom
Copy link
Member Author

mdboom commented Apr 10, 2013

Related to, but not resolved by, #1894

@tacaswell
Copy link
Member

I think this is partially resolved by my PR which changed the background to white. The full fix for this would be to add the ability to pass in base color to that code.

@tacaswell tacaswell modified the milestones: unassigned, v1.5.x Nov 26, 2014
@anntzer
Copy link
Contributor

anntzer commented Feb 2, 2021

afaict this has been fixed, likely by the 2.0 image refactor?

from pylab import *

ax = plt.figure().add_subplot(facecolor="r")
ax.imshow(np.random.rand(4, 4, 4), extent=(0, 2, 0, 2))
ax.imshow(np.random.rand(4, 4, 4), extent=(1, 3, 1, 3))
ax.set(xlim=(0, 3), ylim=(0, 3))
ax.figure.savefig("/tmp/test.ps")
plt.show()

has the axes facecolor correctly showing through.

@anntzer anntzer closed this as completed Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants