我正在尝试将图例添加到使用plotly
创建的图形中,该图形包含一些Maki图标。不幸的是,当我这样做时,plotly
在图例中显示了错误的标记。考虑一个从{a1}的例子,我已经修改为包含^ {CD3>}:
token = 'my_mapbox_token'
fig = go.Figure(go.Scattermapbox(
mode = "markers+text+lines",
lon = [-75, -80, -50], lat = [45, 20, -20],
marker = {'size': 20, 'symbol': ["bus", "harbor", "airport"]},
text = ["Bus", "Harbor", "airport"],textposition = "bottom right"))
fig.update_layout(
mapbox = {
'accesstoken': token,
'style': "outdoors", 'zoom': 0.7},
showlegend = True)
fig.show()
有没有办法在图例中分别列出巴士、港口和机场图标?即使我将每一条添加为单独的轨迹,我也无法生成显示图标的图例
目前没有回答
相关问题 更多 >
编程相关推荐