Thanks to visit codestin.com Credit goes to github.com
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 9b1fcf6 commit 6db8509Copy full SHA for 6db8509
1 file changed
lib/matplotlib/axes/_axes.py
@@ -2745,7 +2745,13 @@ def sign(x):
2745
if np.isnan(dat):
2746
lbl = ''
2747
2748
- annotation = self.annotate(fmt % value if lbl is None else lbl,
+ if lbl is None:
2749
+ formatted_value = (
2750
+ fmt.format(value) if fmt.startswith('{') else fmt % value
2751
+ )
2752
+ else:
2753
+ formatted_value = lbl
2754
+ annotation = self.annotate(formatted_value,
2755
xy, xytext, textcoords="offset points",
2756
ha=ha, va=va, **kwargs)
2757
annotations.append(annotation)
0 commit comments