📜  整数 xticks - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.686000             🧑  作者: Mango

代码示例1
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
#...
ax = plt.figure().gca()
#...
ax.xaxis.set_major_locator(MaxNLocator(integer=True))