Removing specific ticks from matplotlib plot

Posted by Jsg91 on Stack Overflow See other posts from Stack Overflow or by Jsg91
Published on 2013-10-21T15:51:51Z Indexed on 2013/10/21 15:53 UTC
Read the original article Hit count: 279

Filed under:
|

I'm trying to remove the origin ticks from my plot below to stop them overlapping, alternatively just moving them away from each other would also be great I tried this:

enter image description here

xticks = ax.xaxis.get_major_ticks()
xticks[0].label1.set_visible(False)
yticks = ax.yaxis.get_major_ticks()
yticks[0].label1.set_visible(False)

However this removed the first and last ticks from the y axis like so:

enter image description here

Does anyone have an idea about how to do this? Any help would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about matplotlib