We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a2b7c78 commit 5448d57Copy full SHA for 5448d57
1 file changed
lib/matplotlib/tests/test_axes.py
@@ -7773,6 +7773,13 @@ def test_bar_label_fmt(fmt):
7773
assert labels[1].get_text() == '-4.00'
7774
7775
7776
+def test_bar_label_fmt_error():
7777
+ ax = plt.gca()
7778
+ rects = ax.bar([1, 2], [3, -4])
7779
+ with pytest.raises(TypeError, match='str or callable'):
7780
+ _ = ax.bar_label(rects, fmt=10)
7781
+
7782
7783
def test_bar_label_labels():
7784
ax = plt.gca()
7785
rects = ax.bar([1, 2], [3, -4])
0 commit comments