MatplotLib & Seaborn
Table of Contents
1. Excellent Notes on Typesetting Figures for Papers
1.1. Find fonts used in latex
Search for commands like:
< Collapse code block
\renewcommand{\rmdefault}{ppl} \renewcommand{\sfdefault}{phv} \renewcommand{\ttdefault}{pcr}
rmdefault
is the default roman fontsfdefault
=> sans serif fontttdefault
=> typewriter style
Short form of th fonts
Name | Font |
---|---|
bch | Charter |
lmr | Latin Modern Roman |
lmss | Latin Modern Sans Serif |
lmssq | Latin Modern Sans Serif extended |
lmtt | Latin Modern Typewriter |
lmvtt | Latin Modern Typewriter proportional |
pag | Avant Garde |
pbk | Bookman |
pcr | Courier |
phv | Helvetica |
pnc | New Century Schoolbook |
ppl | Palatino |
ptm | Times |
put | Utopia |
pzc | Zapf Chancery |
(From https://www.xoolive.org/2008/04/03/fonts-in-latex.html)
2. After adding a font to system, delete cache
< Collapse code block
rm -r ~/.matplotlib
Font location can be found by
< Collapse code block
import matplotlib return matplotlib.get_cachedir()
/Users/bpanthi977/.matplotlib