Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ME3263_Lab-02/pretty_plots.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
15 lines (13 sloc)
663 Bytes
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
import matplotlib.pyplot as plt | |
def setdefaults(): | |
plt.rcParams.update({'font.size': 22}) | |
plt.rcParams['lines.linewidth'] = 3 | |
plt.rcParams['text.usetex'] = True | |
plt.rcParams['text.latex.unicode'] = True | |
plt.rcParams['text.latex.preamble'] = [ | |
r'\usepackage{siunitx}', # I need upright \micro symbols, but you need... | |
r'\sisetup{detect-all}', # ...this to force siunitx to actually use your fonts | |
r'\usepackage{helvet}', # set the normal font here | |
r'\usepackage{sansmath}', # load up the sansmath so that math -> helvet | |
r'\sansmath' # <- tricky! -- gotta actually tell tex to use! | |
] | |