microsoft / datamations

https://microsoft.github.io/datamations/
Other
67 stars 15 forks source link

ggplot2 datamations can only handle aes() in ggplot() #72

Closed sharlagelfand closed 3 years ago

sharlagelfand commented 3 years ago

A bug for me to look into, something going on where aes() specified within ggplot() is fine:

"small_salary %>%
  group_by(Degree) %>%
  summarize(mean = mean(Salary)) %>%
  ggplot(aes(x = Degree, y = mean)) + 
  geom_point()" %>%
    datamation_sanddance()

But errors when specified in geom_point():

"small_salary %>%
  group_by(Degree, Work) %>%
  summarize(mean = mean(Salary)) %>%
  ggplot() + 
  geom_point(aes(x = Degree, y = mean))" %>%
  datamation_sanddance()

# Error in mapply(.f, .x, .y, MoreArgs = list(...), SIMPLIFY = FALSE) : 
#  zero-length inputs cannot be mixed with those of non-zero length