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

Making the background transparent #29

Open
IlhemB opened this issue Dec 12, 2024 · 3 comments
Open

Making the background transparent #29

IlhemB opened this issue Dec 12, 2024 · 3 comments

Comments

@IlhemB
Copy link

IlhemB commented Dec 12, 2024

Hi,

I was wondering if it would be possible to add an argument for transparency in geom_magnify(). I am encountering an overlap between the original graph and the magnified one, and I would like the background of the magnified section to be transparent so that the underlying main graph remains visible.

Thank you,
Best regrds,

@hughjonesd
Copy link
Owner

hughjonesd commented Dec 13, 2024

Have you tried adding

inset_theme(panel.background = element_rect(fill='transparent'))

to the inset plot?

See the inset_theme help for usage.

@IlhemB
Copy link
Author

IlhemB commented Dec 13, 2024

This is not making the background of geom_magnify transparent. Here how I applied it: geom_magnify(from = from_, to = to_, inset_theme = theme_minimal() + theme(panel.background = element_rect(fill = 'transparent')))

Thank you

@hughjonesd
Copy link
Owner

I understand. Just for certainty could you try using the inset_theme() function and the plot argument to geom_magnify() as shown in the help?

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

2 participants