From the example in <http://bxhorn.com/legends-ggplot/#managing-multiple-legends-in-a-layered-chart> ```r # Multiple Legends # load data data(diamonds) # calc quantiles with specified probabilities new.prob <- c(0.90, 0.95, 0.99) cut.probs <- plyr::ddply(diamonds, .(cut), numcolwise(quantile, probs = new.prob))[, c("cut", "price")] cut.probs <- transform(cut.probs, quantile = c("P90", "P95", "P99")) # layered graph gg<-ggplot(diamonds, aes(cut, price)) + geom_boxplot(aes(fill = factor(cut))) + geom_point(data = cut.probs, aes(cut, price, color = factor(quantile)), size = 5) + scale_fill_discrete(name = "Quality of the Cut") + scale_color_discrete(name = "My Quantiles") gg plotly::ggplotly(gg) ``` 1) Multiple legend titles are clustered together 2) Multiple legends are not separated 3) There is extra text ",1" in legend labels This is the ggplot2 output:  This is the ggplotly output: 