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

Function test_bar_label_fmt

lib/matplotlib/tests/test_axes.py:9395–9400  ·  view source on GitHub ↗
(fmt)

Source from the content-addressed store, hash-verified

9393 '%.2f', '{:.2f}', '{:.2f}'.format
9394])
9395def test_bar_label_fmt(fmt):
9396 ax = plt.gca()
9397 rects = ax.bar([1, 2], [3, -4])
9398 labels = ax.bar_label(rects, fmt=fmt)
9399 assert labels[0].get_text() == '3.00'
9400 assert labels[1].get_text() == '-4.00'
9401
9402
9403def test_bar_label_fmt_error():

Callers

nothing calls this directly

Calls 4

gcaMethod · 0.80
bar_labelMethod · 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…