更新时间:2023-12-05 21:10:28
最简单且可能是规范的方法是使用marker.sizeref
属性.您可以像这样将其包裹在marker=list(...)
内
The simplest, and probably canonical way is to use the marker.sizeref
attribute. You wrap this inside marker=list(...)
like this
plot_geo(sample, locationmode='USA-states') %>%
add_markers(y=~lat, x=~long, hoverinfo="text",
color=~Group, text=~Group, size=~Value,
marker=list(sizeref=0.1, sizemode="area")) %>%
layout(title='plotly marker map', geo=x)
请注意,sizeref
越小,标记越大.例如,通过sizeref=0.02
我们得到
Note that, the smaller sizeref
, the bigger the markers. E.g with sizeref=0.02
we get