Matplotlib.axis.axis.set_major_locator()
matplotlib库的Axis模块中的Axis.set_major_locator()函数用于设置主时钟的定位符。
语法:Axis.set_major_locator(self, locator)
参数:该方法接受以下参数。
- 定位器:该参数是 定位器 .
返回值:该方法不返回任何值。
下面的例子演示了matplotlib.axis.axis.set_major_locator()函数在matplotlib.axis中的作用:
示例1
输出:
示例2
输出: