日々精進

新しく学んだことを書き留めていきます

matplotlibで目盛りを整数にする

以下でできる。

ax.xaxis.set_major_locator(MaxNLocator(integer=True))

参考:

stackoverflow.com