-
Notifications
You must be signed in to change notification settings - Fork 2.1k
scale error when setting aes(colour = NULL) #2688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@ThierryO I can't reproduce this, how recent is your dev ggplot2? Could you try on a fresh master please? |
This also works fine for me. library(ggplot2)
ggplot(mtcars, aes(x = wt, y = mpg, colour = factor(cyl), fill = factor(cyl))) +
geom_smooth(method = "lm", aes(fill = NULL, colour = NULL)) +
geom_point() +
geom_smooth(method = "lm") Created on 2018-06-11 by the reprex package (v0.2.0). Session infodevtools::session_info()
#> Session info -------------------------------------------------------------
#> setting value
#> version R version 3.5.0 (2018-04-23)
#> system x86_64, darwin15.6.0
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> tz America/Chicago
#> date 2018-06-11
#> Packages -----------------------------------------------------------------
#> package * version date source
#> assertthat 0.2.0 2017-04-11 CRAN (R 3.5.0)
#> backports 1.1.2 2017-12-13 CRAN (R 3.5.0)
#> base * 3.5.0 2018-04-24 local
#> bindr 0.1.1 2018-03-13 CRAN (R 3.5.0)
#> bindrcpp 0.2 2017-06-17 CRAN (R 3.5.0)
#> colorspace 1.4-0 2017-12-23 R-Forge (R 3.5.0)
#> compiler 3.5.0 2018-04-24 local
#> curl 3.1 2017-12-12 CRAN (R 3.5.0)
#> datasets * 3.5.0 2018-04-24 local
#> devtools 1.13.5 2018-02-18 CRAN (R 3.5.0)
#> digest 0.6.15 2018-01-28 CRAN (R 3.5.0)
#> dplyr 0.7.4 2017-09-28 CRAN (R 3.5.0)
#> evaluate 0.10.1 2017-06-24 CRAN (R 3.5.0)
#> ggplot2 * 2.2.1.9000 2018-06-10 local
#> glue 1.2.0 2017-10-29 CRAN (R 3.5.0)
#> graphics * 3.5.0 2018-04-24 local
#> grDevices * 3.5.0 2018-04-24 local
#> grid 3.5.0 2018-04-24 local
#> gtable 0.2.0 2016-02-26 CRAN (R 3.5.0)
#> htmltools 0.3.6 2017-04-28 CRAN (R 3.5.0)
#> httr 1.3.1 2017-08-20 CRAN (R 3.5.0)
#> knitr 1.20 2018-02-20 CRAN (R 3.5.0)
#> labeling 0.3 2014-08-23 CRAN (R 3.5.0)
#> lazyeval 0.2.1 2017-10-29 CRAN (R 3.5.0)
#> magrittr 1.5 2014-11-22 CRAN (R 3.5.0)
#> memoise 1.1.0 2017-04-21 CRAN (R 3.5.0)
#> methods * 3.5.0 2018-04-24 local
#> mime 0.5 2016-07-07 CRAN (R 3.5.0)
#> munsell 0.4.3 2016-02-13 CRAN (R 3.5.0)
#> pillar 1.2.1 2018-02-27 CRAN (R 3.5.0)
#> pkgconfig 2.0.1 2017-03-21 CRAN (R 3.5.0)
#> plyr 1.8.4 2016-06-08 CRAN (R 3.5.0)
#> R6 2.2.2 2017-06-17 CRAN (R 3.5.0)
#> Rcpp 0.12.17 2018-05-18 cran (@0.12.17)
#> rlang 0.2.0.9001 2018-05-30 Github (r-lib/rlang@f60976c)
#> rmarkdown 1.9 2018-03-01 CRAN (R 3.5.0)
#> rprojroot 1.3-2 2018-01-03 CRAN (R 3.5.0)
#> scales 0.5.0.9000 2018-06-09 local
#> stats * 3.5.0 2018-04-24 local
#> stringi 1.1.7 2018-03-12 CRAN (R 3.5.0)
#> stringr 1.3.0 2018-02-19 CRAN (R 3.5.0)
#> tibble 1.4.2 2018-01-22 CRAN (R 3.5.0)
#> tools 3.5.0 2018-04-24 local
#> utils * 3.5.0 2018-04-24 local
#> withr 2.1.2 2018-05-30 Github (jimhester/withr@70d6321)
#> xml2 1.2.0 2018-01-24 CRAN (R 3.5.0)
#> yaml 2.1.18 2018-03-08 CRAN (R 3.5.0) |
I've run the example with both the CRAN version and the current master. It works with those versions.
|
Great thanks. |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Uh oh!
There was an error while loading. Please reload this page.
Originally filed as r-lib/scales#125. File again here as requested by @hadley.
The code below used to work. Now it returns the error
Error: Discrete value supplied to continuous scale
. Is this a bug or a feature?I know it can write the same plot as below. But the code above is more succinct.
The text was updated successfully, but these errors were encountered: