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

Force fill of panel.border to be transparent #5782

Closed
teunbrand opened this issue Mar 19, 2024 · 0 comments · Fixed by #5784
Closed

Force fill of panel.border to be transparent #5782

teunbrand opened this issue Mar 19, 2024 · 0 comments · Fixed by #5784
Labels
themes 💃 visual change 👩‍🎨 Rendering change that will affect look of output

Comments

@teunbrand
Copy link
Collaborator

This plot is useless, as all data is obfuscated by the panel.border rectangle.

library(ggplot2)

ggplot(mpg, aes(displ, hwy)) +
  geom_point() +
  theme(panel.border = element_rect())

Created on 2024-03-19 with reprex v2.1.0

It has a white fill because it inherits from the theme's root rect setting. This issue is easy to rectify by setting element_rect(fill = NA) (why yes, I am indeed pleased by this choice of words). I cannot imagine the plot above to be the desired outcome of any plot, so this feature request is to force the fill to be transparent, regardless of input.

@teunbrand teunbrand added visual change 👩‍🎨 Rendering change that will affect look of output themes 💃 labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
themes 💃 visual change 👩‍🎨 Rendering change that will affect look of output
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant