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 936855c commit 61a0cddCopy full SHA for 61a0cdd
lib/matplotlib/ticker.py
@@ -1283,9 +1283,12 @@ def format_eng(self, num):
1283
pow10 += 3
1284
1285
prefix = self.ENG_PREFIXES[int(pow10)]
1286
-
1287
- formatted = "{mant:{fmt}}{sep}{prefix}".format(
1288
- mant=mant, sep=self.sep, prefix=prefix, fmt=fmt)
+ if rcParams['text.usetex']:
+ formatted = "${mant:{fmt}}${sep}{prefix}".format(
+ mant=mant, sep=self.sep, prefix=prefix, fmt=fmt)
1289
+ else:
1290
+ formatted = "{mant:{fmt}}{sep}{prefix}".format(
1291
1292
1293
return formatted
1294
0 commit comments