matplotlib coordinates format [duplicate]

一个人想着一个人 提交于 2019-12-01 05:13:56

The ax.fmt_xdata attribute can be set to a function that formats the displayed string.

For example:

ax.fmt_xdata = lambda x: "{0:f}".format(x)
ax.fmt_ydata = lambda x: "{0:f}".format(x)

You can also completely override the default labeling by setting format_coord

ax.format_coord = lambda x, y: "({0:f}, ".format(y) +  "{0:f})".format(x)

example, api doc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!