Skip to content

Instantly share code, notes, and snippets.

@sergeyprokudin
Last active April 28, 2020 13:08
Show Gist options
  • Save sergeyprokudin/3e3a30648cb4908d8c7a33e4f26a5c4d to your computer and use it in GitHub Desktop.
Save sergeyprokudin/3e3a30648cb4908d8c7a33e4f26a5c4d to your computer and use it in GitHub Desktop.
Setting latex font for matplotlib plots
# details:
# https://stackoverflow.com/questions/11367736/matplotlib-consistent-font-using-latex/27697390
from matplotlib import rc
import matplotlib
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment