-
Notifications
You must be signed in to change notification settings - Fork 0
/
matplotlib_config.py
46 lines (40 loc) · 1.39 KB
/
matplotlib_config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'''
matplotlib config file for plots.
'''
import matplotlib as mpl
mpl.use('TkAgg')
#mpl.use('Agg')
import matplotlib.pyplot as plt
#from matplotlib import rc
### Correct format for latex in matplotib from nik
# import matplotlib
# matplotlib.use(‘Agg’)
# import matplotlib.pyplot as plt
# from matplotlib import rc
#
# # Use latex font.
# # rc(‘font’, **{‘family’: ‘serif’, ‘serif’: [‘Computer Modern’]})
# # rc(‘text’, usetex=True)
def update_rcParams():
# This mpl style is from the UCSC BME163 class.
plt.rcParams.update({
#'pgf.texsystem' : 'pdflatex',
'font.size' : 12.0 ,
#'font.family' : 'DejaVu Sans',
'xtick.major.size' : 4 ,
'xtick.major.width' : 0.75 ,
'xtick.labelsize' : 12.0 ,
'xtick.direction' : 'out' ,
'ytick.major.size' : 4 ,
'ytick.major.width' : 0.75 ,
'ytick.labelsize' : 12.0 ,
'ytick.direction' : 'out' ,
'xtick.major.pad' : 2 ,
'xtick.minor.pad' : 2 ,
'ytick.major.pad' : 2 ,
'ytick.minor.pad' : 2 ,
'savefig.dpi' : 900 ,
'axes.linewidth' : 0.75 ,
#'text.usetex' : True ,
'text.latex.unicode' : False })
update_rcParams()