We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2fb344 commit 877532eCopy full SHA for 877532e
examples/units/evans_test2.py
examples/units/radian_demo.py
@@ -1,16 +1,21 @@
1
+"""
2
+Plot with radians from the basic_units mockup example package
3
+This example shows how the unit class can determine the tick locating,
4
+formatting and axis labeling.
5
6
import numpy as np
7
from basic_units import radians, degrees, cos
-from pylab import figure, show
8
+from matplotlib.pyplot import figure, show
9
10
x = np.arange(0, 15, 0.01) * radians
11
12
fig = figure()
13
fig.subplots_adjust(hspace=0.3)
14
+
15
ax = fig.add_subplot(211)
16
ax.plot(x, cos(x), xunits=radians)
17
18
ax = fig.add_subplot(212)
19
ax.plot(x, cos(x), xunits=degrees)
20
21
show()
-
0 commit comments