在跟踪级别上进行绘图控制。尝试将不想出现在图例中
showlegend=False的
Histogram痕迹传递进去。
参考:https :
//plot.ly/python/reference/#Histogram-
showlegend
示例:https://plot.ly/python/legend/#Hiding-Legend-
Entries
从上面的链接直接复制粘贴。
import plotly.plotly as pyfrom plotly.graph_objs import *# Fill in with your personal username and API key# or, use this public demo accountpy.sign_in('Python-Demo-Account', 'gwt101uhh0')trace1 = Scatter( x=[0, 1, 2], y=[1, 2, 3], name='First Trace', showlegend=False)trace2 = Scatter( x=[0, 1, 2, 3], y=[8, 4, 2, 0], name='Second Trace', showlegend=True)data = Data([trace1, trace2])plot_url = py.plot(data, filename='show-legend')您要查看的用法
trace1如上所示。



