Skip to content

[Bug]: savefig(..., transparent=True) does not make inset_axes transparent #22674

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

Closed
anntzer opened this issue Mar 20, 2022 · 4 comments
Closed
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Mar 20, 2022

Bug summary

All's in the title.

Code for reproduction

from pylab import *
gca().inset_axes([.1, .2, .3, .4]); savefig("/tmp/test.png", transparent=True)

# then display /tmp/test.png with a viewer that distinguishes between white and transparent: the inset axes is not transparent.

Actual outcome

Inset is not transparent.

Expected outcome

Inset is transparent (... well, admittedly I guess whether one wants this or not may be figure-dependent?) (mildly relatedly, see also #10023.)

Additional information

No response

Operating system

arch linux

Matplotlib Version

3.6.0.dev1856+ga2ddfc0c0f

Matplotlib Backend

agg

Python version

310

Jupyter version

ENOSUCHLIB

Installation

git checkout

@QuLogic
Copy link
Member

QuLogic commented Mar 22, 2022

I'm surprised that the regular Axes was made transparent in the first place, but apparently that's what it's supposed to do.

@sramesh750
Copy link
Contributor

I could start working on this issue!

@timhoffm
Copy link
Member

@sramesh750 Go for it!

transparent=True should make all Axes transparent. Should more special needs arise, we can still add more options like transparent='figure' later, but I would hold that until someone asks for it.

@rcomer
Copy link
Member

rcomer commented Feb 25, 2023

Closed by #24816 I think.

@rcomer rcomer closed this as completed Feb 25, 2023
@QuLogic QuLogic added this to the v3.8.0 milestone Feb 27, 2023
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

5 participants