-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathplot_utils.py
More file actions
119 lines (103 loc) · 2.13 KB
/
plot_utils.py
File metadata and controls
119 lines (103 loc) · 2.13 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import logging
import matplotlib.pyplot as plt
logger_font = logging.getLogger("fontTools")
logger_font.setLevel(logging.WARN)
params = {
"axes.labelsize": 24,
"axes.titlesize": 24,
"font.size": 24,
"xtick.labelsize": 24,
"ytick.labelsize": 24,
"lines.linewidth": 2,
"legend.fontsize": 24,
"legend.handlelength": 2,
"legend.borderaxespad": 0.2,
"figure.figsize": [12, 8],
}
plt.rcParams.update(params)
FIG_DIR = "figure/"
FIG_TYPE = "png"
def get_colors(n):
COLOR_FIVE = [
"#f0f9e8",
"#bae4bc",
"#7bccc4",
"#43a2ca",
"#0868ac",
]
COLOR_FIVE = [
"#eff3ff",
"#bdd7e7",
"#6baed6",
"#3182bd",
"#08519c",
]
COLOR_FOUR = ["#ca0020", "#f4a582", "#92c5de", "#0571b0"]
COLOR_THREE = [
"#e0f3db",
"#a8ddb5",
"#43a2ca",
]
COLOR_TWO = ["#ca0020", "#0571b0"]
# COLOR_TWO = ["#ef8a62", "#67a9cf"]
COLOR_SIX = [
"#b2182b",
"#ef8a62",
"#fddbc7",
"#d1e5f0",
"#67a9cf",
"#2166ac",
]
COLOR_SEVEN = [
"#eff3ff",
"#c6dbef",
"#9ecae1",
"#6baed6",
"#4292c6",
"#2171b5",
"#084594",
]
# COLOR_FOUR = ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5", ]
COLOR_THREE = [
"#fee6ce",
"#fdae6b",
"#e6550d",
]
colors = {
2: COLOR_TWO,
3: COLOR_THREE,
4: COLOR_FOUR,
5: COLOR_FIVE,
6: COLOR_SIX,
7: COLOR_SEVEN,
}
return colors[n]
def get_linestyles():
linestyles = ["solid", "dotted", "dashed", "dashdot"]
return linestyles
def get_markers():
markers = [
"o",
"v",
"s",
"p",
"^",
"<",
">",
"P",
"1",
"2",
"3",
"4",
"+",
"x",
"X",
"d",
"D",
]
markers = "os<*^p>"
return markers
def get_hatches():
patterns = ("-", "+", "x", "\\", "*", "o", "O", ".", "/")
# patterns = ("", '-', '+', 'x', '\\', '*', 'o', 'O', '.', '/')
return patterns