【发布时间】:2017-07-10 21:37:02
【问题描述】:
当我尝试使用 ggplotly() 时,我丢失了解释色阶的图例。如果我使用颜色而不是大小,则会出现图例。使用尺寸时如何让图例出现?
library(dplyr)
library(plotly)
plot <- mtcars %>%
ggplot(aes(x = mpg, y = cyl, size = disp, frame = hp)) +
geom_point()
ggplotly(plot) %>%
layout(showlegend = T)
【问题讨论】: