plotly / plotly/plotly.js

add a way to make the lasso selection of a plotly express scatter_matrix restrictive instead of additive

Open
#6,818 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature P3
Dominant language
JavaScript
Stars
18.3k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
28

Description

When creating a scatter_matrix using plotly express:

import plotly.express as px
df = px.data.iris()
fig = px.scatter_matrix(df,
    dimensions=df.columns[0:4],
    color=df.columns[4])
fig.update_layout(
    autosize=False,
    width=1200,
    height=1200,
)
fig.show()

then highlighting a subset of the data using the lasso or rectangular selection tool also highlights the corresponding points in the other graphs.

However, when marking points in two plots I would often prefer that not the union of those are highlighted but the intersection. In the example image below this would mean that only a few red and green points are still visible/highlighted, but no blue points.

This is the feature I would like to have: A way to control whether the union or the intersection of all selections are highlighted.

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 by tracing how lasso and rectangular selections are propagated across the scatter_matrix example in plotly.js. Define and implement a way to choose union or intersection behavior, then verify that selections in multiple plots highlight exactly the requested combined set.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.