-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
Greetings
I am trying to add an inside guide with theme_void()
, and I'm not sure why throwing a warning message (In rep(padding, length.out = 4) : 'x' is NULL so the result will be NULL
). But when we use other theme, it's OK.
Here is a simple example
library(ggplot2) ## 3.5.0.9000
p <- ggplot(mpg, aes(displ, hwy)) + geom_point()
## it's OK
p +
guides(custom = guide_custom(grid::circleGrob(),
title = "My circle",
width = unit(2, "cm"),
height = unit(2, "cm")))
## but will throw a warning message when add theme_void()
p +
guides(custom = guide_custom(grid::circleGrob(),
title = "My circle",
width = unit(2, "cm"),
height = unit(2, "cm"))) +
theme_void()