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

Function test_label_loc_horizontal

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

Source from the content-addressed store, hash-verified

98
99@check_figures_equal()
100def test_label_loc_horizontal(fig_test, fig_ref):
101 ax = fig_test.subplots()
102 sc = ax.scatter([1, 2], [1, 2], c=[1, 2], label='scatter')
103 ax.legend()
104 ax.set_ylabel('Y Label', loc='bottom')
105 ax.set_xlabel('X Label', loc='left')
106 cbar = fig_test.colorbar(sc, orientation='horizontal')
107 cbar.set_label("Z Label", loc='left')
108
109 ax = fig_ref.subplots()
110 sc = ax.scatter([1, 2], [1, 2], c=[1, 2], label='scatter')
111 ax.legend()
112 ax.set_ylabel('Y Label', y=0, ha='left')
113 ax.set_xlabel('X Label', x=0, ha='left')
114 cbar = fig_ref.colorbar(sc, orientation='horizontal')
115 cbar.set_label("Z Label", x=0, ha='left')
116
117
118@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…