|
From: Pierre H. <pie...@cr...> - 2014-02-17 14:58:50
|
Hi, In order to get a plot with a small number of ticks, it is possible to create a matplotlib.ticker.MaxNLocator object with a small value for `nbins`. However, I found it also possible to modify the existing AutoLocator instances, since AutoLocator derives from MaxNLocator : ax.xaxis.major.locator.set_params(nbins=5) ax.yaxis.major.locator.set_params(nbins=5) (the default nbins value seems to be 9) The advantage of this inplace solution is that it doesn't any importing/browsing in the mpl namespace. However, it's still a bit long. I was then wondering : 1) is this solution recommended or not ? 2) is there a shortcup to avoird the five "dots" ? best, Pierre |