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

Function test_label_loc_vertical

lib/matplotlib/tests/test_axes.py:81–96  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

79
80@check_figures_equal()
81def test_label_loc_vertical(fig_test, fig_ref):
82 ax = fig_test.subplots()
83 sc = ax.scatter([1, 2], [1, 2], c=[1, 2], label='scatter')
84 ax.legend()
85 ax.set_ylabel('Y Label', loc='top')
86 ax.set_xlabel('X Label', loc='right')
87 cbar = fig_test.colorbar(sc)
88 cbar.set_label("Z Label", loc='top')
89
90 ax = fig_ref.subplots()
91 sc = ax.scatter([1, 2], [1, 2], c=[1, 2], label='scatter')
92 ax.legend()
93 ax.set_ylabel('Y Label', y=1, ha='right')
94 ax.set_xlabel('X Label', x=1, ha='right')
95 cbar = fig_ref.colorbar(sc)
96 cbar.set_label("Z Label", y=1, ha='right')
97
98
99@check_figures_equal()

Callers

nothing calls this directly

Calls 7

set_ylabelMethod · 0.80
set_xlabelMethod · 0.80
subplotsMethod · 0.45
scatterMethod · 0.45
legendMethod · 0.45
colorbarMethod · 0.45
set_labelMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…