1"""
2============
3Radian ticks
4============
5
6Plot with radians from the basic_units mockup example package.
7
8
9This example shows how the unit class can determine the tick locating,
10formatting and axis labeling.
11
12.. only:: builder_html
13
14   This example requires :download:`basic_units.py <basic_units.py>`
15"""
16
17import matplotlib.pyplot as plt
18import numpy as np
19
20from basic_units import radians, degrees, cos
21
22x = [val*radians for val in np.arange(0, 15, 0.01)]
23
24fig, axs = plt.subplots(2)
25
26axs[0].plot(x, cos(x), xunits=radians)
27axs[1].plot(x, cos(x), xunits=degrees)
28
29fig.tight_layout()
30plt.show()
31