The following describes pretty well how to make a scatter matrix:
https://plotly.com/python/splom/#scatter-matrix-splom-with-gosplom
But nowhere does it mention legend. If I set showlegend=True I only get "trace 0" (i.e. the generic name of the Plotly trace) instead of the actual category names. I can't seem to figure out where to put in my category array without crashing the plot.
showlegend=True
If I take the index_vals array shown in the examples for colors, and place it in e.g. legendgroup=index_vals I get ValueError: Invalid value of type 'pandas.core.series.Series' received for the 'legendgroup'.
index_vals
legendgroup=index_vals
ValueError: Invalid value of type 'pandas.core.series.Series' received for the 'legendgroup'
How should it be done?
1.4m articles
1.4m replys
5 comments
57.0k users