2

When using geom_boxplot in conjunction with ggplotly and highlight_key I get an error message that reads All elements of ... must be named. Did you want key = c(key)?

For example, this script produces the error:

d <- highlight_key(subset(txhousing, year >= 2012 & !is.na(median)), ~city)
p <- ggplot(d, aes(date, median, group = city)) +  geom_jitter() +  geom_boxplot()
gg <- ggplotly(p, tooltip = "city") 
highlight(gg, dynamic = TRUE)

However, this script without boxplot does not:

d <- highlight_key(subset(txhousing, year >= 2012 & !is.na(median)), ~city)
p <- ggplot(d, aes(date, median, group = city)) +  geom_jitter() 
gg <- ggplotly(p, tooltip = "city") 
highlight(gg, dynamic = TRUE)

A more complex example of this code worked for me a couple of months ago, but does not seem to work currently. Any ideas what this error means. I have searched and cannot find documentation on it.

Braden
  • 345
  • 5
  • 11

0 Answers0