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

Function test_bar_label_nan_ydata

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

Source from the content-addressed store, hash-verified

9416
9417
9418def test_bar_label_nan_ydata():
9419 ax = plt.gca()
9420 bars = ax.bar([2, 3], [np.nan, 1])
9421 labels = ax.bar_label(bars)
9422 assert [l.get_text() for l in labels] == ['', '1']
9423 assert labels[0].xy == (2, 0)
9424 assert labels[0].get_verticalalignment() == 'bottom'
9425
9426
9427def test_bar_label_nan_ydata_inverted():

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…