plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

empty splom in case of two dimensions

Open jbentvelsen opened this issue 1 year ago • 1 comments

Creating a splom with two dimensions, no diagonal and only the upper or lower half results in an empty figure.

Code that reproduces 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

Expected result A single scatter plot.

jbentvelsen avatar Oct 15 '24 14:10 jbentvelsen

original issue reported on the Plotly forum in this post.

Coding-with-Adam avatar Oct 15 '24 16:10 Coding-with-Adam