Add the same trace to multiple subplots?

I am trying to add the same trace to two subplots so that when color is automatically rendered for the trace it is the same for both subplots by default. I have used fig.append() to add the same trace to each subplot, but the color is still different for the same trace in each subplot.

Essentially I am plotting the same data in two subplots - one is a zoomed in view. I do not want to manually have to match the colors (or put in color codes) between the two plots so the symbols are the same for each trace.


Hi @spencerchad,

Itโ€™s not possible for the same trace to reside in multiple subplots. Calling fig.append_trace essentially copies the input trace object to add to the figure, which is why youโ€™re seeing multiple styles. So in order to have the traces appear identical youโ€™ll need to specify the trace color/symbol properties before calling append_trace, this way plotly wonโ€™t apply itโ€™s default color cycle.