在使用ggplotly
和鼠标悬停功能时,我很难设置文本格式.
library(plotly)
df <- data.frame(a=letters, b=LETTERS, x=runif(26), y=runif(26))
g <- ggplot(df, aes(x,y)) + geom_point(aes(text=sprintf('letter: %s\nLetter: %s', a, b)))
g
(gg <- ggplotly(g))
我想有一些格式化的文本或至少在我的鼠标标签换行.关于如何设计鼠标在泡泡上的东西,有好的文档吗?