plotly包:让ggplot2的静态图片变得可交互
1234 |
library(plotly)p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) + geom_bar(position = "dodge")ggplotly(p) |
plotly支持facet,不过当facet的图形超过9个以后,legend处会出现bug。
时间: 2024-10-10 17:06:06
1234 |
library(plotly)p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) + geom_bar(position = "dodge")ggplotly(p) |
plotly支持facet,不过当facet的图形超过9个以后,legend处会出现bug。