Skip to content

API: convert string fontsize to points immediately #7007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Dec 12, 2016
Prev Previous commit
Next Next commit
API: cache usetex value at text creation time
  • Loading branch information
tacaswell committed Dec 12, 2016
commit 2ddcc68c7de0cfef089e5b09bcad0c4a3d04afab
4 changes: 2 additions & 2 deletions lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,7 @@ def is_math_text(s):
"""
# Did we find an even number of non-escaped dollar signs?
# If so, treat is as math text.
if rcParams['text.usetex']:
if self.get_usetex():
if s == ' ':
s = r'\ '
return s, 'TeX'
Expand Down Expand Up @@ -1256,7 +1256,7 @@ def set_usetex(self, usetex):
`rcParams['text.usetex']`
"""
if usetex is None:
self._usetex = None
self._usetex = rcParams['text.usetex']
else:
self._usetex = bool(usetex)
self.stale = True
Expand Down