我想写成成正比\pi
轴的弧度单位:像如何在Python图中以弧度设置y轴?
$\frac{\pi}{4}$, $\frac{\pi}{2}$, ...
代替
0.785, 1.5707 ...
有什么标准呢?作为一个例子,我应该在下面的代码中添加什么?
from pylab import *
x=arange(-10.0,10.0,0.1)
y= arctan(x)
plot(x,y,'b.')
show()
我发现这个例子http://matplotlib.sourceforge.net/examples/units/radian_demo.html而是因为我没有basic_units模块这是行不通的。
谢谢!
“我发现这个例子http://matplotlib.sourceforge.net/examples/units/radian_demo.html,但它不起作用,因为我没有basic_units模块。”是的你是。它在Matplotlib的示例文件夹中。 – endolith