Skip to content

Commit

Permalink
Swap usetex=True font.family as defaulted by matplotlib in any case -…
Browse files Browse the repository at this point in the history
… now we just see the logging.infos from matplotlib with new defaults
  • Loading branch information
alhom committed Sep 9, 2024
1 parent e419f12 commit 5630629
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytools.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
if not os.getenv('PTNOLATEX'):
matplotlib.rc('text', usetex=True)
matplotlib.rcParams['text.latex.preamble'] = r'\boldmath'
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
# matplotlib.rcParams['mathtext.fontset'] = 'stix'
# matplotlib.rcParams['font.family'] = 'STIXGeneral'
# Matplotlib suppressed logging messages came out after enabling logging.INFO: font.family must be one of (serif, sans-serif, cursive, monospace) when text.usetex is True. serif will be used by default.
matplotlib.rcParams['font.family'] = 'serif'
logging.info("Using LaTeX formatting")
# matplotlib.rcParams['text.dvipnghack'] = 'True' # This hack might fix it on some systems

Expand Down

0 comments on commit 5630629

Please sign in to comment.