I am trying to plot cartesian axes like here:
Because of overlapping yticks I want to reduce their number. I tried this approach.
for n, label in enumerate(ax.axis[direction].get_ticklabels()):
if n % 5 != 0:
label.set_visible(False)
But it gave an error:
'AxisArtist' object has no attribute 'get_ticklabels'
How can I overcome it?