plotly / plotly/plotly.R

When combining Plotly plots using subplots, the middle plot shrinks

Open
#2,434 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
2.7k
Forks
641
PR merge metrics
No merged PRs in 30d

Description

When combining Plotly plots using subplots, if ncol is 2 and nrow is greater than 2, the height of the middle row is smaller compared to the top and bottom plots. Similarly, if nrow is 2 and ncol is greater than 2, the height of the middle column is smaller compared to the first and last plots. This discrepancy occurs because the margin values are not applied consistently; the top margin value is not applied to the top plot, and the bottom margin value is not applied to the bottom plot. Is there any workaround to get all plot in same height

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

The issue names no files, tests, or entry points. Start by reproducing the unequal subplot heights with ncol and nrow greater than two, then trace how subplot margins are calculated and applied. Done means the rows or columns have equal plot heights while preserving the requested margins, with regression coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data-visualization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.