Skip to content

Instantly share code, notes, and snippets.

@fabiofortkamp
Created July 12, 2017 07:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabiofortkamp/fe97a4e39c19ad9f5af29610458b8640 to your computer and use it in GitHub Desktop.
Save fabiofortkamp/fe97a4e39c19ad9f5af29610458b8640 to your computer and use it in GitHub Desktop.
Common matplotlib configuration, with LaTeX and my own packages, for easier generation of engineering plots
import matplotlib
import matplotlib.pyplot as plt
mpl_params = {'text.usetex': True,
'font.family': 'serif',
'font.serif': 'Palatino',
'text.latex.preamble': [r'\usepackage{engsymbols}',
r'\usepackage{magref}',
r'\usepackage{siunitx}']}
matplotlib.rcParams.update(mpl_params)
@julionaojulho
Copy link

How have I not known that earlier?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment