我已经在Plotly中创建了一个散点图,可以很好地渲染,包括显示线和标记Plotly screenshot
但是,当我通过Dash调用此图时,线和标记无法工作-它只会显示标记
当我使用mode = lines时,我在Dash中获得了线条,但是晚上反转选项将不会显示标记+线条
我的代码:
dict(type='scattergeo',
locationmode='country names',
lon = [From_lon,To_lon],
lat = [From_lat,To_lat],
mode='lines + markers',
opacity = max(min(1,float(df.iloc[i]['Volume']/2000)),0.1),
#opacity = min(1,float(df.iloc[i]['Volume']/1000)),
name = df.iloc[i]['ALP From'] + "->" + df.iloc[i]['ALP To'] + " " + df.iloc[i]['Volume'].astype(str),
hoverinfo="name",
line = dict(color=df.iloc[i]['Marker_col'],
width = max(2,df.iloc[i]['Volume']/2000)
)
谢谢
答案 0 :(得分:0)
您应从"lines + markers"
中删除空格,并改用mode="lines+markers"