Python & Matplotlib: put x-axis in centre but tick and label is not followed to the x-axis

From the docs, use 'zero' when setting the position of the spine:

ax.spines['bottom'].set_position('zero')

Output:

enter image description here

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top