-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSetPub.py
More file actions
52 lines (37 loc) · 1.63 KB
/
Copy pathSetPub.py
File metadata and controls
52 lines (37 loc) · 1.63 KB
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
47
48
49
50
51
52
import numpy as np
import matplotlib.pylab as plt
from matplotlib import ticker
from itertools import cycle
from cycler import cycler
np.set_printoptions(precision=3)
def set_pub():
""" Pretty plotting changes in rc for publications
Might be slower due to usetex=True
plt.minorticks_on() - activate for minor ticks in each plot
"""
plt.rc('font', weight='bold') # bold fonts are easier to see
#plt.rc('font',family='serif')
# plt.rc('font', **{'family': 'serif', 'serif': ['Computer Modern']})
plt.rc('text', usetex=True) # Slower
plt.rc('font',size=12) # 18 usually
# plt.rcParams['image.cmap'] = 'nipy_spectral_r'
plt.rcParams['image.cmap'] = 'plasma'
plt.rc('lines', lw=1, color='k', markeredgewidth=1.5) # thicker black lines
#plt.rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines
plt.rc('savefig', dpi=300) # higher res outputs
plt.rc('xtick', labelsize='x-large')
plt.rc('ytick', labelsize='x-large')
plt.rc('axes',labelsize= 10)
plt.rcParams['xtick.major.size'] = 12
plt.rcParams['xtick.major.width'] = 1.5
plt.rcParams['xtick.minor.size'] = 8
plt.rcParams['xtick.minor.width'] = 1
plt.rcParams['ytick.major.size'] = 12
plt.rcParams['ytick.major.width'] = 1.5
plt.rcParams['ytick.minor.size'] = 8
plt.rcParams['ytick.minor.width'] = 1
#plt.rcParams.update({'font.size': 15})
#plt.rcParams['axes.color_cycle'] = [ 'navy', 'forestgreen', 'darkred']
plt.rc('axes', prop_cycle=(cycler('color', list('rbgk')) + cycler('linestyle', ['-', '--', ':', '-.'])))
#import SetPub
#SetPub.set_pub()