【发布时间】:2016-04-08 22:29:55
【问题描述】:
在使用 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))
我想在我的鼠标悬停标签上有一些格式化的文本或至少一个换行符。有没有关于如何设计这个鼠标悬停在气泡上的好文档?
【问题讨论】: