plotly / plotly/plotly.py

Legend makes it associated with the subplot with dynamically responsive design and the ability to enable turn off individual trace

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

Nobody has claimed this yet.

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

Description

The current legend_tracegroupgap implementation is in pixel.

Desired behavior:
if I have 2 subplots (col=2, row=1) to be able to enable legend_per_subplot = True

Default vertical legend on the right side:
subplot(2 traces) | Legend with 2 traces
subplot(4 traces) | Legend with 4 traces

The workaround with legend_tracegroupgap does not match the need as they are expressed in pixels instead of domain-like subplots.

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 reviewing the current legend_tracegroupgap implementation and how legends are associated with subplots in the Python graphing library. The work is done when a two-column, one-row subplot layout can enable per-subplot legends, with each legend showing only the traces from its associated subplot and responsive positioning rather than pixel-based spacing.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.