Scatter plot data padding when using auto scale

I have a scatter plot that is configured to use autoscale however I would like it to autoscale without any padding between the data and the axis. If I switch from markers to lines the first data point aligns against the first axis.

In the plot below you can see where is the spacing is between the first point and the y axis. Is there a way to make the data plot closer to the axis when using markers?

autoscale

To do so, you’ll need to set the xaxis and yaxis range values.

See https://github.com/plotly/plotly.js/issues/1775

and subscribe to https://github.com/plotly/plotly.js/issues/1876 for for the latest development info.

Also run into this issue…
Have line-scatter as wanted; now needed lines+markers and booom i got a padding. This is really frustrating that plotly does so much “magic” if you just change one small thing.

Sad part about this issue is, that there is no configuration-option to skip the padding if you have markers and a non-filled graph: https://github.com/plotly/plotly.js/blob/v1.42.2/src/traces/scatter/calc.js#L187

1 Like