Menu

[r3303]: / trunk / users_guide / code / radian_demo.py  Maximize  Restore  History

Download this file

19 lines (12 with data), 383 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from basic_units import radians, degrees, cos
from pylab import figure, show, nx
x = nx.arange(0, 15, 0.01) * radians
fig = figure()
fig.subplots_adjust(hspace=0.3)
ax = fig.add_subplot(211)
ax.plot(x, cos(x), xunits=radians)
ax = fig.add_subplot(212)
ax.plot(x, cos(x), xunits=degrees)
fig.savefig('../figures/radian_demo.png')
fig.savefig('../figures/radian_demo.ps')
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.