Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5782.

Briefly, whenever the panel border is rendered with element_render(), a fill = NA is passed to set a transparent fill regardless of the element settings.

Reprex from linked issue:

devtools::load_all("~/packages/ggplot2")
#> ℹ Loading ggplot2

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

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

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@teunbrand teunbrand merged commit d3adf17 into tidyverse:main May 20, 2024
@teunbrand teunbrand deleted the transparent_panel_border branch May 20, 2024 11:42
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

Successfully merging this pull request may close these issues.

Force fill of panel.border to be transparent

2 participants