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

Function test_spines_axes_positions

lib/matplotlib/tests/test_spines.py:59–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58@image_comparison(['spines_axes_positions.png'], style='mpl20')
59def test_spines_axes_positions():
60 # SF bug 2852168
61 fig = plt.figure()
62 x = np.linspace(0, 2*np.pi, 100)
63 y = 2*np.sin(x)
64 ax = fig.add_subplot(1, 1, 1)
65 ax.set_title('centered spines')
66 ax.plot(x, y)
67 ax.spines.right.set_position(('axes', 0.1))
68 ax.yaxis.set_ticks_position('right')
69 ax.spines.top.set_position(('axes', 0.25))
70 ax.xaxis.set_ticks_position('top')
71 ax.spines.left.set_color('none')
72 ax.spines.bottom.set_color('none')
73
74
75@image_comparison(['spines_data_positions.png'], style='mpl20')

Callers

nothing calls this directly

Calls 7

figureMethod · 0.80
add_subplotMethod · 0.80
set_titleMethod · 0.45
plotMethod · 0.45
set_positionMethod · 0.45
set_ticks_positionMethod · 0.45
set_colorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…