yaweige / ggpcp

Webpage for ggpcp: https://yaweige.github.io/ggpcp/
GNU General Public License v3.0
13 stars 2 forks source link

Bug for class(diamonds$color) return c("ordered", "factor") #7

Closed yaweige closed 5 years ago

heike commented 5 years ago

Just for our own sake - always add a minimal reproducible examples for which the code fails. That makes it easier to (a) remember what you meant by a bug issue and (b) to do something about it. In this case, an example would be

library(tidyverse)
library(ggpcp)

diamonds_sample <- sample_n(diamonds, 200)
diamonds_sample %>% 
  ggplot(aes(vars = vars(cut, color, clarity), colour = cut)) +
  geom_pcp(boxwidth = 1) + geom_pcp_box(boxwidth =1)
heike commented 5 years ago

ordered factors are cast to factors in gather_pcp