I'm struggling to hide the legend for some but not all of the lines in my line plot. Here is what the plot looks like now.
Plot:
Essentially I want to hide the legend for the light grey lines while keeping it in place for the coloured lines.
Here's my code:
import plotly.graph_objects as go
fig = go.Figure()
fig.update_layout(autosize=False, width=800, height=500, template='none')
fig.update_layout(title = 'Title', xaxis_title = 'Games', yaxis_title = 'Profit')
for team in rest_teams:
fig.add_traces(go.Scatter(x=df['x'], y = df[team], name = team, line = {'color': '#F5F5F5'}))
for team in big_eight:
line_dict = {'color': cmap[team]}
fig.add_traces(go.Scatter(x=df['x'], y = df[team], name = team, line = line_dict))
fig.show()
I can update layout with
fig.update_layout(showlegend=False)
which hides the whole thing and isn't optimal. Help would be appreciated.