-
Notifications
You must be signed in to change notification settings - Fork 0
/
plot_config.py
65 lines (52 loc) · 2.01 KB
/
plot_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
import matplotlib.font_manager
import numpy as np
sns.set(style="ticks", palette="Set2")
colors = plt.cm.viridis(np.linspace(0.85, 0.0, 5))
CB91_Blue = colors[4]
CB91_Green = colors[1]
matplotlib.rcParams["axes.prop_cycle"] = plt.cycler(color=colors)
mpl.rcParams["axes.grid"] = True
mpl.rcParams["figure.facecolor"] = (1.0, 1.0, 1.0, 1.0)
mpl.rcParams["savefig.facecolor"] = (1.0, 1.0, 1.0, 1.0)
SMALL_SIZE = 7
MEDIUM_SIZE = 7
BIGGER_SIZE = 9
from os.path import expanduser
import matplotlib as mpl
import matplotlib.font_manager as font_manager
# mpl.use('Agg')
fontpath = expanduser("/usr/share/fonts/opentype/adobe/MyriadPro-Regular.otf")
prop = font_manager.FontProperties(fname=fontpath)
mpl.rcParams["font.family"] = prop.get_name()
mpl.rcParams["text.usetex"] = False
COLOR = "#6A6A6C"
COLOR = "black"
mpl.rcParams["text.color"] = COLOR
mpl.rcParams["axes.edgecolor"] = COLOR
mpl.rcParams["axes.labelcolor"] = COLOR
mpl.rcParams["xtick.color"] = COLOR
mpl.rcParams["ytick.color"] = COLOR
mpl.rc("font", size=SMALL_SIZE) # controls default text sizes
mpl.rc("axes", titlesize=7) # fontsize of the axes title
mpl.rc("axes", labelsize=7) # fontsize of the x and y labels
mpl.rc("xtick", labelsize=6) # fontsize of the tick labels
mpl.rc("ytick", labelsize=6) # fontsize of the tick labels
mpl.rc("legend", fontsize=SMALL_SIZE) # legend fontsize
mpl.rc("figure", titlesize=BIGGER_SIZE) # fontsize of the figure title
mpl.rcParams["grid.color"] = "#dddddd"
mpl.rcParams["grid.linewidth"] = 0.4
mpl.rcParams["axes.linewidth"] = 0.4
mpl.rcParams["axes.facecolor"] = "#fAfAfC"
mpl.rcParams["lines.linewidth"] = 1.0
mpl.rcParams["lines.markersize"] = 3.2
mpl.rcParams["xtick.major.size"] = 3
mpl.rcParams["xtick.major.width"] = 0.4
mpl.rcParams["xtick.minor.size"] = 3
mpl.rcParams["xtick.minor.width"] = 0.4
mpl.rcParams["ytick.major.size"] = 3
mpl.rcParams["ytick.major.width"] = 0.4
mpl.rcParams["ytick.minor.size"] = 3
mpl.rcParams["ytick.minor.width"] = 0.4