Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b0da1aa

Browse filesBrowse files
committed
ticker.py: small cleanups after review
1 parent 5eec9e1 commit b0da1aa
Copy full SHA for b0da1aa

File tree

Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-6
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+3-6Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.