We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d85eb62 + 7c6d056 commit 853266cCopy full SHA for 853266c
R/geom-.r
@@ -78,7 +78,12 @@ Geom <- ggproto("Geom",
78
# Trim off extra parameters
79
params <- params[intersect(names(params), self$parameters())]
80
81
- lapply(split(data, data$PANEL), function(data) {
+ if (nlevels(as.factor(data$PANEL)) > 1L) {
82
+ data_panels <- split(data, data$PANEL)
83
+ } else {
84
+ data_panels <- list(data)
85
+ }
86
+ lapply(data_panels, function(data) {
87
if (empty(data)) return(zeroGrob())
88
89
panel_params <- layout$panel_params[[data$PANEL[1]]]
0 commit comments