Hi @shakasom, welcome to the forum! plotly express functions return a figure object (with data and layout). So, to add a trace to your existing figure created by plotly express, you can either
Thanks @Emmanuelle. I understood and successfully used the second option. You add the trace with fig.data and by the way I stumbled upon that colors and markers can be changed using fig.data. That was cool.
This is very helpful. However, if I want to change the colors and formatting of ONLY the added_trace, how can I do that? data[0] obviously appears to omit the layout.
For example, I want a red line graph of activity over a month, with blue bar graphs showing the weekend days. How can I do that?
This was the only real post I could find online close to the issue I am having. I could not locate a functioning answer within the documentation either. How does one overlay two scattermapboxes? add_trace will only allow me to add one element [as shown in your post].
fig1 = px.scatter_mapbox (Random Coordinates Set 1)
fig2 = px.scatter_mapbox (Random Coordinates Set 2)
I just want to display these on the same map/figure/surface however is correct verbage for the end product.