Skip to content Skip to sidebar Skip to footer

Is There A Way To Change Origin Axis (zeroline) On Scatter Graph?

Is there a way to change axes on scatter graph? let's say move the axis from (0,0) i.e (zero-line) to something like (3,3) and make a quadrant graph I've tried setting the 'zerolin

Solution 1:

If you run help(fig['layout']['xaxis']) you'll see that the only options for zeroline are:

 zeroline
     Determines whether or not a line is drawn at along the
     0 value of this axis. If True, the zero line is drawn
     on top of the grid lines.
 zerolinecolor
     Sets the line color of the zero line.
 zerolinewidth
     Sets the width (in px) of the zero line.

So if your approach with...

setting the "zeroline" value on both "xaxis" and "yaxis" to False and then drawing two constant lines across both the axes from 'shapes'.

...works out for you, I really think that's your best option.


Post a Comment for "Is There A Way To Change Origin Axis (zeroline) On Scatter Graph?"