【发布时间】:2019-04-13 17:15:54
【问题描述】:
假设我有一个使用 R plotly 的简单散点图。
我想在散点图的每个点上放置文本,如图所示。
简单的 R 极坐标图:
library(plotly)
p <- plot_ly(
type = 'scatterpolar',
r = c(0,1,2,2),
theta = c(0,45,90,120),
size = c(10, 20, 30, 40),
sizes = c(100, 300),
mode = 'markers'
)
p
输出图表:
以同样的方式使用plot_ly 和scatterpolar,我怎样才能将文本放在每个气泡的中心并带有一些值让我们说size 列的值。?
提前致谢!
【问题讨论】:
标签: r plotly scatter-plot