Skip to content

ggplotly ignores aesthetics other than colour for geom_density #479

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

Closed
humburg opened this issue Mar 4, 2016 · 1 comment
Closed

ggplotly ignores aesthetics other than colour for geom_density #479

humburg opened this issue Mar 4, 2016 · 1 comment

Comments

@humburg
Copy link

humburg commented Mar 4, 2016

When aesthetics other than colour are used to distinguish groups these are ignored by ggplotly. This is particularly problematic in cases where there is more than one grouping variable.

A simple example:

library(plotly)
data(iris)

p <- ggplot(iris, aes(linetype=Species)) + geom_density(aes(x=Petal.Length))
p # works as expected
ggplotly(p) # shows only solid black lines

Output of devtools::session_info()

Session info ----------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.2.3 (2015-12-10)
 system   x86_64, mingw32             
 ui       RStudio (0.99.489)          
 language (EN)                        
 collate  English_Australia.1252      
 tz       Australia/Sydney            
 date     2016-03-04                  

Packages --------------------------------------------------------------------------------------
 package     * version     date       source                          
 base64enc     0.1-3       2015-07-28 CRAN (R 3.2.3)                  
 colorspace    1.2-6       2015-03-11 CRAN (R 3.2.1)                  
 curl          0.9.6       2016-02-17 CRAN (R 3.2.3)                  
 devtools      1.10.0.9000 2016-02-22 Github (hadley/devtools@24728f7)
 digest        0.6.9       2016-01-08 CRAN (R 3.2.3)                  
 ggplot2     * 2.1.0       2016-03-01 CRAN (R 3.2.3)                  
 git2r         0.13.1      2015-12-10 CRAN (R 3.2.3)                  
 gridExtra     2.2.1       2016-02-29 CRAN (R 3.2.3)                  
 gtable        0.2.0       2016-02-26 CRAN (R 3.2.3)                  
 htmltools     0.3         2015-12-29 CRAN (R 3.2.3)                  
 htmlwidgets   0.6         2016-02-25 CRAN (R 3.2.3)                  
 httr          1.1.0       2016-01-28 CRAN (R 3.2.3)                  
 jsonlite      0.9.19      2015-11-28 CRAN (R 3.2.3)                  
 knitr         1.12.3      2016-01-22 CRAN (R 3.2.3)                  
 magrittr      1.5         2014-11-22 CRAN (R 3.2.0)                  
 memoise       1.0.0       2016-01-29 CRAN (R 3.2.3)                  
 munsell       0.4.3       2016-02-13 CRAN (R 3.2.3)                  
 plotly      * 2.5.0       2016-03-04 Github (ropensci/plotly@63608e5)
 plyr          1.8.3       2015-06-12 CRAN (R 3.2.0)                  
 R6            2.1.2       2016-01-26 CRAN (R 3.2.3)                  
 Rcpp          0.12.3      2016-01-10 CRAN (R 3.2.3)                  
 scales        0.4.0       2016-02-26 CRAN (R 3.2.3)                  
 viridis       0.3.2       2015-12-31 CRAN (R 3.2.3)                  
 withr         1.0.1       2016-02-04 CRAN (R 3.2.3)  
@cpsievert
Copy link
Collaborator

This should be fixed in f1900cc. Let us know if you still have problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants