Created
March 11, 2021 16:23
-
-
Save chi-feng/f72cb0b9f82efb06751c9e2bc5f31862 to your computer and use it in GitHub Desktop.
matplotlib latex configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# need to set configuration before import pyplot from matplotlib | |
import matplotlib | |
matplotlib.rc('font', size='10') | |
matplotlib.rc('text', usetex=True) | |
matplotlib.rc('font', family='serif') | |
matplotlib.rc('font' ,serif='Computer Modern') | |
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}\usepackage{amsfonts}\usepackage{amssymb}"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment