-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py
32 lines (24 loc) · 1.09 KB
/
settings.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
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
import numpy as np
def cm_to_inch(value):
return value/2.54
def applySettings():
plt.style.use(['science', 'nature', 'no-latex'])
plt.rcParams["figure.figsize"] = (cm_to_inch(16), cm_to_inch(13))
plt.rcParams["figure.dpi"] = 1200
plt.rcParams["axes.labelsize"] = 11
plt.rcParams["axes.titlesize"] = 9
plt.rcParams["xtick.labelsize"] = 9
plt.rcParams["ytick.labelsize"] = 9
plt.rcParams['axes.facecolor'] = 'white'
plt.rcParams['figure.facecolor'] = 'white'
plt.rcParams["font.family"] = "Arial"
def colorMap(num_spc):
colors = [(0, 0, 0), (1, 0, 0)] # first color is black, last is red
cm = LinearSegmentedColormap.from_list(
"Custom", colors, N=num_spc)
cols = cm(np.linspace(0, 1, int(num_spc/2)))
return cols
#colors = ["#000000", "#EF0000", "#336699", "#3BC371", "#FC913A", "#666699", "#FF6666", "#CC6600", "#6699CC", "#99867A", "#999999", "#6B67BC", "#009999"]
colors = ["#000", "#EF0000", "#666699", "#3BC371", "#FEC211", "#336699" ,"#999999"]