After creating the figure in plotly, to disable the legend you can make use of this command:
fig.update_layout(showlegend=False)
For Advanced users:
You can also enable/disable the legend for individual traces in a figure by setting the showlegend property of each trace. For instance:
fig.add_trace(go.Scatter(
x=[1, 2],
y=[1, 2],
showlegend=False))
You can view the examples here: https://plotly.com/python/legend/