# How do you hide some traces initially in Plotly Express?

I have graphs with lots of traces. It would be nice to hide the not-essential traces as default.

By hiding I mean that traces are not visible, and the legend entry is dimmed. I.e. the same state that happens when user clicks an legend entry.

Note that there is an earlier question on almost the same topic, but not quite (How do you hide traces initially in Plotly Express?). I want to initially hide only few traces and leave the others visible.

Hi @perza and welcome to the forum!

You can apply the same logic but only to some of the traces, like this:

`fig.update_traces(visible='legendonly', selector=dict(name="d"))`

Full example:

``````from plotly.subplots import make_subplots

fig = make_subplots(rows=1, cols=2)

marker=dict(size=20, color="LightSeaGreen"),
name="a", row=1, col=1)

marker=dict(color="MediumPurple"),
name="b", row=1, col=1)

marker=dict(size=20, color="MediumPurple"),
name="c", row=1, col=2)