plotly / plotly/plotly.py

empty splom in case of two dimensions

Open
#4,802 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the go.Splom reproduction in the issue, especially the two dimensions, hidden diagonal, and lower-half-only settings. Run the script with fig.show() or fig.write_html() and trace the generated figure behavior. Done means the two-dimensional lower-half-only splom renders its single scatter plot instead of an empty figure.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, pandas, python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.