Diff of /app/scratch/test_pgf.py [000000] .. [4de1c7]

Switch to unified view

a b/app/scratch/test_pgf.py
1
# -*- coding: utf-8 -*-
2
import matplotlib.pyplot as plt
3
import matplotlib as mpl
4
mpl.use("pgf")
5
pgf_with_pdflatex = {
6
    "pgf.texsystem": "pdflatex",
7
    "pgf.preamble": [
8
         r"\usepackage[utf8x]{inputenc}",
9
         r"\usepackage[T1]{fontenc}",
10
         #r"\usepackage{cmbright}",
11
         ]
12
}
13
14
plt.figure(figsize=(4.5, 2.5))
15
plt.plot(range(5))
16
plt.text(0.5, 3., "serif")
17
plt.text(0.5, 2., "monospace", family="monospace")
18
plt.text(2.5, 2., "sans-serif", family="sans-serif")
19
plt.text(2.5, 1., "comic sans", family="Comic Sans MS")
20
# plt.xlabel(u"µ is not $\\mu$")
21
# plt.tight_layout(.5)
22
plt.savefig("pgf_texsystem.pgf")
23