I have a log-log contour plot for which I needed to display the minor ticks. So I used
ax.xaxis.set_minor_formatter(fmt("%.1f"))
ax.yaxis.set_minor_formatter(fmt("%.1f"))
where fmt
is from matplotlib.ticker import FormatStrFormatter as fmt
This works fine and gives me all the minor ticks. However as you can see from the attached image, the x-axis ticks, especially 7.0,8.0 and 9.0
are the ticks that overlap, and I want to specifically remove only them, but have the other minor ticks as they are.
Is this possible? I am not able to find a code that removes specific minor ticks.