Matplotlib.axis.axis.get_ticklocs()
matplotlib库的Axis模块中的Axis.get_ticklocs()函数用于获取数据坐标中的tick位置数组。
语法:Axis.get_ticklocs(self, minor=False)
参数:该方法接受以下参数。
- minor: boolean值。如果True返回次要的ticklocs,否则返回主要的ticklocs。
返回值:该方法以数据坐标返回标记位置数组。
下面的例子演示了matplotlib.axis.axis.get_ticklocs()函数在matplotlib.axis中的作用:
示例1
输出:
示例2
输出: