【发布时间】:2021-11-03 11:47:44
【问题描述】:
我用标题和副标题创建了下面的 ggplot,但是当我使用 ggplotly() 显示它时,副标题丢失了。
library(ggplot2)
p <- ggplot(ToothGrowth, aes(x = factor(dose), y = len)) +
geom_boxplot()
library(plotly)
p <- p + labs(title = "Effect of Vitamin C on Tooth Growth",
subtitle = "Plot of length by dose",
caption = "Data source: ToothGrowth")
ggplotly(p)
【问题讨论】: