I have a chart, created in pandas, where I've set the y-axis to range from -100 to -100.
Is there an easy way to have the x-axis cross the y-axis at y=0, instead of crossing at y=-100 (or, how to display the x-axis at the vertical center, instead of at the bottom of the chart)
Solutions I've seen seem to use subplots or spines, which seem to be overly complicated for my purpose. I am looking for something more integrated with pandas, like passing the ylim
or style
argument)
Sample code:
from pandas import Series
s=Series([-25,0,70])
s.plot(ylim=(-100,100))