Plotly express scatter matrix hide upper half and diagonal

How do you hide the upper half of the matrix generated by Plotly express scatter matrix? There doesn’t seem to be an in-built function to do that, unlike Plotly graph objects.

I’m asking because splom plots generate a lot of points and the redundant ones at the top half consume a lot of computational/graphic power.

As for the reason why I don’t use go.Splom, it is because they have a hard time splitting groups by legend. So if someone can answer this question that’ll be great too.

Hi @divadlen you can use showupperhalf=False. Here an aexample:

import plotly.express as px
df = px.data.iris()

fig = px.scatter_matrix(
    data_frame=df,
    dimensions=["sepal_width", "sepal_length", "petal_width", "petal_length"],
    color="species", symbol="species",
    title="Scatter matrix of iris data set",
    labels={col:col.replace('_', ' ') for col in df.columns}) # remove underscore

fig.update_traces(diagonal_visible=True,  showupperhalf=False)
fig.show()