R ggplot注释:包含超链接?
是否可以在R ggplot注释:包含超链接?,r,ggplot2,hyperlink,annotations,label,R,Ggplot2,Hyperlink,Annotations,Label,是否可以在ggplot中创建包含超链接的注释层 我想在闪亮的应用程序中使用ggplot,而不是导出到文件 以下操作不起作用: data <- data.frame( a = c(1, 2, 3), b = c(5, 2, 3) ) data %>% ggplot() + geom_point(aes(x = a, y = b)) + annotate(geom = "label", x = 2, y = 3, label = "<
ggplot
中创建包含超链接的注释层
我想在闪亮的应用程序中使用ggplot
,而不是导出到文件
以下操作不起作用:
data <- data.frame(
a = c(1, 2, 3),
b = c(5, 2, 3)
)
data %>%
ggplot() +
geom_point(aes(x = a, y = b)) +
annotate(geom = "label", x = 2, y = 3, label = "<a href = 'http://google.com'>I am a link</a>")
数据%
ggplot()+
几何点(aes(x=a,y=b))+
注释(geom=“label”,x=2,y=3,label=”“)
相关吗?我也看到了这一点,但我在一个闪亮的应用程序中使用ggplot,而不是将其导出到文件中……re Shining:谢谢-但这篇文章明确提到了plot.ly库和可点击点(ggplot也可以通过ggiraph包实现这一点)。我特别指的是ggplot注释层中的可点击文本。使用geom=“text”
然后ggplotly(p)
似乎可以。。。只是不是一个标签