Should plot with no layers add geom_blank() ? #1246
Closed
Comments
I think this would be useful in Shiny apps, where layers are added in response to some user input. Right now, if no layers are added, you'd need to do an explicit check for that, and then add This would happen in the build phase, right? |
Yeah, I'd just change: if (length(plot$layers) == 0) stop("No layers in plot", call. = FALSE) to if (length(plot$layers) == 0) {
plot <- plot + geom_blank()
} |
Fixed in 1ab70de |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Instead of current (not very useful behaviour)
The text was updated successfully, but these errors were encountered: