Showing posts with label matplotlib. Show all posts
Showing posts with label matplotlib. Show all posts

Monday, January 30, 2017

Adjust density of labeled ticks, the easy way

For future reference, here's the easiest way to set the density of labeled ticks on a plot:

In gnuplot:
set xtics 4
set ytics 3
In python matplotlib:
plt.locator_params(axis='x', nbins=4)
plt.locator_params(axis='y', nbins=3)

Source