有人能帮我使用matplotlib设置固定位置的刻度吗?我尝试使用FixedPosition,就像这个教程所描述的那样:
ax = pl.gca()
ax.xaxis.set_major_locator(eval(locator))
http://scipy-lectures.github.io/intro/matplotlib/matplotlib.html#figures-subplots-axes-and-ticks
但是当我尝试运行时,它告诉我set_major_locator方法不存在。
一个简单的例子将非常有用。
谢谢。
eval
生成示例图可能非常聪明,但locator
的值非常不清楚。 - tacaswell