Figure
对象没有属性show
。
我正在尝试使用plotly
可视化网络。我通过遵循https://plot.ly/python/network-graphs/
创建了网络,但是在工作簿中看不到它。请帮助我。
Fig = go.Figure(data=[edge_trace, node_trace],
layout=go.Layout(
title='<br>Network graph made with Python',
showlegend=False,
hovermode='closest',
margin=dict(b=20,l=5,r=5,t=40),
annotations=[ dict(
text="Python code: <a href='https://plot.ly/ipython-notebooks/network-graphs/'> https://plot.ly/ipython-notebooks/network-graphs/</a>",
showarrow=False,
xref="paper", yref="paper",
x=0.005, y=-0.002 ) ],
xaxis=dict(showgrid=False, zeroline=False, showticklabels=False),
yaxis=dict(showgrid=False, zeroline=False, showticklabels=False)))
Fig.show()
它应该生成图形。
答案 0 :(得分:0)
您可能需要升级到plotly
的4.0.0版本。