Matplotlib.axes.axes.format_coord()
Matplotlib是Python中的一个库,它是NumPy库的数值-数学扩展。Axes包含了大多数图形元素:Axis、Tick、Line2D、Text、Polygon等,并设置坐标系。Axes的实例通过callbacks属性支持回调。
Matplotlib.axes.axes.format_coord()函数
matplotlib库的Axes模块中的Axes.format_coord()函数用于返回格式化x, y坐标的格式化字符串。
语法:Axes.format_coord(self, x, y)
返回值:该方法返回格式化x, y坐标的格式字符串。
下面的例子演示了matplotlib.axes.axes.format_coord()函数在matplotlib.axes中的作用:
示例1
输出:
示例2
输出: