Skip to content

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #5856.

It just falls back to an empty margin() when it was not declared in the theme.

Reprex from issue:

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

ggplot(mpg, aes(displ, hwy)) + 
  geom_point() + 
  guides(custom = guide_custom(grid::circleGrob(),
                               title = "My circle",
                               width = unit(2, "cm"),
                               height = unit(2, "cm"))) +
  theme_void()

Created on 2024-04-23 with reprex v2.1.0

@thomasp85
Copy link
Member

/document

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 4eb6587 into tidyverse:main Apr 29, 2024
@teunbrand teunbrand deleted the custom_guide_void branch April 29, 2024 08:35
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.

custom guide with theme_void() will throw a warning message

2 participants