plotly.js icon indicating copy to clipboard operation
plotly.js copied to clipboard

Scatter Plot: Vertical Empty Space WITHIN PLOT AREA at the top/bottom.

Open bewithjonam opened this issue 6 years ago • 2 comments

Issue:

Given there are X entries to be plotted as a scatter plot And I have given a height in the layout (X * 20) When I plot a scatter plot chart Then there is an empty space at the top & bottom (empty space increases with the number of entries)

Expected:

Given .... When I plot a scatter plot chart Then there is no empty space at the top & bottom

Minimum Repro Steps:

https://codepen.io/bewithjonam/pen/GRJoKLG

bewithjonam avatar Feb 14 '20 06:02 bewithjonam

That's the expected behavior at the moment (unfortunately).

This issue is essentially a duplicate of https://github.com/plotly/plotly.js/issues/1775

The main take-home points are:

  • we add "padding" about the y-axis range for scatter traces except in a few cases (full logic here)
  • that "padding" is computed as 5% of the axis length, meaning the longer the y-axis, the greater the number of pixel of padding within the y-axis range (see logic here)

We are hoping to make our autorange behavior more configurable in the future. You can subscribe to https://github.com/plotly/plotly.js/issues/1876 for the most up-to-date development info.

etpinard avatar Feb 14 '20 14:02 etpinard

Closing. Please subscribe to https://github.com/plotly/plotly.js/issues/1876 for the most up-to-date development info.

etpinard avatar Feb 17 '20 15:02 etpinard