我正在使用Plotly制作一张区域分布图(choropleth plot)。但是地理地图看起来太小了。
我的代码如下:
fig = px.choropleth(df,
geojson=geojson,
locations="Capitalize",
featureidkey="properties.name",
color="Scale",
hover_name='Capitalize',
hover_data=['Quantity'],
animation_frame="Period",
projection="mercator",)
fig.update_geos(fitbounds="locations", visible=False)
fig.update_layout(title_text = 'Product A',
autosize=True,
hovermode='closest',
title_x = 0.5,
margin={"r":0,"t":100,"l":0,"b":0},
geo=dict(showframe = False, showcoastlines = False))
width和height属性并不能完全符合我的要求。我只想扩大地理地图。在plotly中,我该如何做到这一点?