(fmt)
| 9393 | '%.2f', '{:.2f}', '{:.2f}'.format |
| 9394 | ]) |
| 9395 | def 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 | |
| 9403 | def test_bar_label_fmt_error(): |