We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f57f30e commit 7329d6aCopy full SHA for 7329d6a
lib/matplotlib/cbook/__init__.py
@@ -2336,11 +2336,6 @@ def _auto_format_str(fmt, value):
2336
'0 or {}'
2337
"""
2338
try:
2339
- lbl = fmt % value
2340
- # when used in `Axes.bar_label()`` this doesn't always raise an error
2341
- # when the {}-style formatting should be used instead of %-style
2342
- if lbl == fmt:
2343
- raise TypeError
2344
- return lbl
+ return fmt % (value,)
2345
except (TypeError, ValueError):
2346
return fmt.format(value)
0 commit comments