Black Lives Matter. Please consider donating to Black Girls Code today.

Graph spacing from yaxis inconsistent between graphs

Is there any way to add some padding inbetween the yaxis and graph? As per the line and bar charts below, they’re starting from different distances from the yaxis so it’s not possible to line up the days when you put both graphs on top of eachother.

plotlyissue

Do you want to do this from Python or Javascript? I think your question is related to Offset graph from axis

You can change the range of the xaxis (for a categorical axis the positions correspond to indices).

That worked nicely, thanks.

I changed range: {type:’date’} to [-1,15] in JavaScript.