Reputation: 75
I would like to change the ticks intervals on a figure, which looks like that:
I use this:
plt.xticks(np.arange(1945, 2016, 10))
However, what I finally get is:
As you can see, I can't take out the smaller ticks. I tried this line:
ax.tick_params(axis='x', length=0)
But without success, since it show this:
I lost the ticks I would like to plot.
To plot, my code is:
for row, plot in enumerate(toplot):
for col, country in enumerate(countries):
ax = axes[row][col]
(dx[(plot, country)]
.plot(ax=ax, c=color)
)
Any idea?
Upvotes: 0
Views: 141
Reputation: 1131
It looks like what you want to do is disable the "minor ticks". Here you can find the official documentation about it, and another thread on stackoverflow about it. I did not try it myself bu just adding ax.minorticks_off()
should do the trick !
Upvotes: 1