Closed
Description
This probably hast o do with how ggplot2 is deriving the level variable from isoband's names.
Reprex:
library(ggplot2)
options(OutDec= ".")
ggplot(faithfuld, aes(waiting, eruptions, z = density)) +
geom_contour_filled()
ggplot(faithfuld, aes(waiting, eruptions, z = density)) +
geom_contour(aes(color = after_stat(factor(level))))
options(OutDec= ",")
ggplot(faithfuld, aes(waiting, eruptions, z = density)) +
geom_contour_filled()
#> Warning in pretty_isoband_levels(names(isobands)): NAs introduced by coercion
#> Warning in pretty_isoband_levels(names(isobands)): NAs introduced by coercion
#> Warning: Computation failed in `stat_contour_filled()`
#> Caused by error in `levels<-`:
#> ! factor level [3] is duplicated
ggplot(faithfuld, aes(waiting, eruptions, z = density)) +
geom_contour(aes(color = after_stat(factor(level))))
#> Warning in compute_group(...): NAs introduced by coercion
#> Warning in min(x): no non-missing arguments to min; returning Inf
#> Warning in max(x): no non-missing arguments to max; returning -Inf
#> Error: Must request at least one colour from a hue palette.
Created on 2023-12-01 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels