plotly / plotly/plotly.py

allow to specify min_group_size in graphs that include grouping (e.g. using 'color', 'facet_row/col' etc.)

Open
#4,657 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

when using 'grouped' plots, we'd often like to see trends/differentations between separate groups.
however, it is common that some of the groups are very 'small', thus the data shown for them is confusing (and sometunes also distorts the rest of the plot, because the range can be very large).

i think allowing specification of min_group_size (Optional[int]) can be very beneficial, mitigating this issue, and eliminating the need of boilerplate code from the user side.

thank you for all your great work!

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 the grouped-plot paths that support color, facet_row, and facet_col, then inspect their existing tests and grouping behavior. Define how Optional[int] min_group_size should apply across these grouping options, including invalid or omitted values. Done means small groups are consistently excluded without requiring user-side filtering, with coverage for the supported grouping cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
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.