Empty plot when creating splom with two dimensions and no diagonal

I use Sploms in my streamlit application. The splom can have 2 or more dimensions.
I don’t want to see the diagonal and only one half, so I use:

        fig = go.Figure(
            go.Splom(
                dimensions=[
                    {"label": label, "values": data[label]} for label in labels
                ],
                diagonal={"visible": True},
                showupperhalf=True,
                showlowerhalf=False,
                showlegend=False,
            ),
        )

This works fine for cases with more than 2 dimensions, however, when I use exactly two dimensions I get an empty plot… Setting both showupperhalf and showlowerhalf to True, or setting diagonal to visible does generate a plot as expected (but not the one that I want).

I know I can use a simple go.Scatter for the two dimensional case, however, in streamlit switching from one plot type to another slows things down tremendously.

HI @randomizedset
can you extract the graph from the app and share the code with us to reproduce the splom plot? It would be much easier to help if we could replicate the error with you Plotly code.

in streamlit switching from one plot type to another slows things down tremendously

I would recommend you switch to Dash. It’s faster.

Here is a full snippet that will reproduce the issue.

import numpy as np
import pandas as pd
import plotly.graph_objects as go

data = pd.DataFrame({"col1": np.random.rand(10), "col2": np.random.rand(10)})

fig = go.Figure(
    go.Splom(
        dimensions=[{"label": label, "values": data[label]} for label in data.columns],
        diagonal={"visible": False},
        showupperhalf=False,
        showlowerhalf=True,
    ),
)


fig.write_html("test.html")  # or fig.show()
# Gives me an empty plot. Setting `diagonal` or `showupperhalf` to `True` does give a plot

I think this might be a bug. We’ll have to look deeper into this, @randomizedset .
Would you be able to report this as a new issue on Plotly’s github?