How can I change the marker size in plotly in R on a map? If I set the size
argument to any number it makes it the same, too big size. And if I map it to a vari
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)
Note that, the smaller sizeref
, the bigger the markers. E.g with sizeref=0.02
we get