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

Function test_bar_label_location_vertical

lib/matplotlib/tests/test_axes.py:9260–9270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9258
9259
9260def test_bar_label_location_vertical():
9261 ax = plt.gca()
9262 xs, heights = [1, 2], [3, -4]
9263 rects = ax.bar(xs, heights)
9264 labels = ax.bar_label(rects)
9265 assert labels[0].xy == (xs[0], heights[0])
9266 assert labels[0].get_horizontalalignment() == 'center'
9267 assert labels[0].get_verticalalignment() == 'bottom'
9268 assert labels[1].xy == (xs[1], heights[1])
9269 assert labels[1].get_horizontalalignment() == 'center'
9270 assert labels[1].get_verticalalignment() == 'top'
9271
9272
9273def test_bar_label_location_vertical_yinverted():

Callers

nothing calls this directly

Calls 5

gcaMethod · 0.80
bar_labelMethod · 0.80
get_verticalalignmentMethod · 0.80
barMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…