8000 ticker.py: small cleanups after review · matplotlib/matplotlib@adaf175 · GitHub
[go: up one dir, main page]

Skip to content

Commit adaf175

Browse files

committed
ticker.py: small cleanups after review
1 parent 2c488b7 commit adaf175

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/matplotlib/ticker.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,10 +468,7 @@ def get_usetex(self):
468468
return self._usetex
469469

470470
def set_usetex(self, val):
471-
if val is None:
472-
self._usetex = mpl.rcParams['text.usetex']
473-
else:
474-
self._usetex = val
471+
self._usetex = mpl._val_or_rc(val, 'text.usetex')
475472

476473
usetex = property(fget=get_usetex, fset=set_usetex)
477474

@@ -1481,9 +1478,9 @@ def get_offset(self):
14811478
if self._useMathText or self._usetex:
14821479
if sciNotStr != '':
14831480
sciNotStr = r'\times%s' % sciNotStr
1484-
s = fr'${sciNotStr}{offsetStr}$'
1481+
s = f'${sciNotStr}{offsetStr}$'
14851482
else:
1486-
s = ''.join((sciNotStr, offsetStr))
1483+
s = sciNotStr + offsetStr
14871484
return self.fix_minus(s)
14881485
return ''
14891486

0 commit comments

Comments
 (0)
0