-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
This is a slightly contrived example, but the bar's width calculation can be chatty when there is a factor level in the PANEL
that has 0 rows in the data.
library(ggplot2)
df <- mpg
df$drv <- factor(df$drv, c("4", "f", "r"))
ggplot(subset(df, drv != "4"), aes(cyl, cty)) +
geom_col() +
facet_wrap(~ drv, drop = FALSE)
#> Warning in min(x): no non-missing arguments to min; returning Inf
#> Warning in max(x): no non-missing arguments to max; returning -Inf
#> Warning in min(d[d > tolerance]): no non-missing arguments to min; returning
#> Inf
Created on 2024-01-05 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels