MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_polar_units_1

Function test_polar_units_1

lib/matplotlib/tests/test_polar.py:117–128  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

115
116@check_figures_equal()
117def test_polar_units_1(fig_test, fig_ref):
118 import matplotlib.testing.jpl_units as units
119 units.register()
120 xs = [30.0, 45.0, 60.0, 90.0]
121 ys = [1.0, 2.0, 3.0, 4.0]
122
123 plt.figure(fig_test)
124 plt.polar([x * units.deg for x in xs], ys)
125
126 ax = fig_ref.add_subplot(projection="polar")
127 ax.plot(np.deg2rad(xs), ys)
128 ax.set(xlabel="deg")
129
130
131@check_figures_equal()

Callers

nothing calls this directly

Calls 5

figureMethod · 0.80
add_subplotMethod · 0.80
registerMethod · 0.45
plotMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…