-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsns_plotting.py
81 lines (73 loc) · 2.3 KB
/
sns_plotting.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import matplotlib.pyplot as plt
import seaborn as sns
def plotting(grid=True, dark=False):
plt.rcdefaults()
style = 'darkgrid'
if (grid) and (dark):
rc={
'figure.figsize': (9, 6),
'axes.facecolor': '#111111',
'figure.facecolor': '#111111',
'grid.color': '#6f6f6f',
'grid.linewidth': 0.75,
"lines.linewidth": 1.5,
'text.color': 'white',
'xtick.color': 'white',
'ytick.color': 'white',
'axes.titlepad': 18,
'legend.frameon': False,
'axes.edgecolor': '#6f6f6f',
'axes.linewidth': .75,
'patch.force_edgecolor': True,
'axes.labelcolor': 'white'
}
elif (grid) and (not dark):
rc={
'figure.figsize': (9, 6),
'axes.facecolor': 'white',
'figure.facecolor': 'white',
'grid.color': '#dddddd',
'grid.linewidth': 0.75,
"lines.linewidth": 1.5,
'text.color': 'black',
'xtick.color': 'black',
'ytick.color': 'black',
'axes.titlepad': 18,
'legend.frameon': False,
'axes.edgecolor': '#dddddd',
'axes.linewidth': .75,
'patch.force_edgecolor': True,
'axes.labelcolor': 'black'
}
elif (not grid) and (dark):
rc={
'figure.figsize': (9, 6),
'axes.spines.top': False,
'axes.spines.right': False,
'axes.facecolor': '#111111',
'figure.facecolor': '#111111',
"lines.linewidth": 1.5,
'text.color': 'white',
'xtick.color': 'white',
'ytick.color': 'white',
'axes.titlepad': 18,
'axes.edgecolor': '#dddddd',
'legend.frameon': False,
'axes.labelcolor': 'white'
}
style = 'ticks'
elif (not grid) and (not dark):
rc={
'figure.figsize': (9, 6),
'axes.spines.top': False,
'axes.spines.right': False,
'legend.frameon': False,
}
style = 'ticks'
sns.set_theme(
context='notebook',
style=style,
font_scale=1.25,
color_codes=True,
rc=rc
)