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

Function test_polar_alignment

lib/matplotlib/tests/test_polar.py:79–96  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77
78@image_comparison(['polar_alignment.png'], style='mpl20')
79def test_polar_alignment():
80 # Test changing the vertical/horizontal alignment of a polar graph.
81 angles = np.arange(0, 360, 90)
82 grid_values = [0, 0.2, 0.4, 0.6, 0.8, 1]
83
84 fig = plt.figure()
85 rect = [0.1, 0.1, 0.8, 0.8]
86
87 horizontal = fig.add_axes(rect, polar=True, label='horizontal')
88 horizontal.set_thetagrids(angles)
89
90 vertical = fig.add_axes(rect, polar=True, label='vertical')
91 vertical.patch.set_visible(False)
92
93 for i in range(2):
94 fig.axes[i].set_rgrids(
95 grid_values, angle=angles[i],
96 horizontalalignment='left', verticalalignment='top')
97
98
99def test_polar_twice():

Callers

nothing calls this directly

Calls 5

figureMethod · 0.80
add_axesMethod · 0.80
set_thetagridsMethod · 0.80
set_rgridsMethod · 0.80
set_visibleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…