[英]how to remove states from plotly Scattergeo trace?
Ok, so this solved my issue.好的,所以这解决了我的问题。 I had to superimpose a new trace.
我不得不叠加一个新的痕迹。 Take into account that the
marker_line_color
has to be set equal to your paper_bgcolor
, once you got this, in order to avoid some aliasing between the Cholorpleth
and the Scattergeo
, set the marker_line_width
to something bigger than the default value, eg 2.考虑到
marker_line_color
必须设置为等于您的paper_bgcolor
,一旦你得到这个,为了避免Cholorpleth
和Scattergeo
之间的一些混叠,将marker_line_width
设置为大于默认值的值,例如 2。
chorpleth = go.Choropleth(
locationmode='USA-states',
z=[0,0],
locations=['AK','HI'],
colorscale = [[0,'rgba(0, 0, 0, 0)'],[0,'rgba(0, 0, 0, 0)']],
marker_line_color='#fafafa',
marker_line_width=2,
showscale = False,
)
fig.add_trace(chorpleth, row=1, col=1)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.