forked from LeoGrin/tabular-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotting.py
More file actions
47 lines (42 loc) · 1.55 KB
/
plotting.py
File metadata and controls
47 lines (42 loc) · 1.55 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
from matplotlib import rcParams
from matplotlib import rc
import seaborn as sns
""""Set some global params and plotting settings."""
# Font options
rc('text', usetex=True)
# rcParams['pdf.fonttype'] = 42
# rcParams['ps.fonttype'] = 42
fs = 9
label_fs = fs - 1
family = 'serif'
rcParams['font.family'] = 'serif'
rcParams['font.sans-serif'] = ['Times']
rcParams['font.size'] = fs
prop = dict(size=fs)
legend_kwargs = dict(frameon=True, prop=prop)
new_kwargs = dict(prop=dict(size=fs-4))
# Styling
c = 'black'
rcParams.update({'axes.edgecolor': c, 'xtick.color': c, 'ytick.color': c})
rcParams.update({'axes.linewidth': 0.5})
linewidth = 3.25063 # in inches
textwidth = 6.75133
# Global Names (Sadly not always used)
acquisition_step_label = 'Acquired Points'
LABEL_ACQUIRED_DOUBLE = 'Acquired Points'
LABEL_ACQUIRED_FULL = 'Number of Acquired Test Points'
diff_to_empircal_label = r'Difference to Full Test Loss'
std_diff_to_empirical_label = 'Standard Deviation of Estimator Error'
sample_efficiency_label = 'Efficiency'
LABEL_RANDOM = 'I.I.D. Acquisition'
LABEL_STD = 'Median \n Squared Error'
LABEL_RELATIVE_COST = 'Relative Labeling Cost'
LABEL_MEAN_LOG = 'Mean Log Squared Error'
# Color palette
CB_color_cycle = ['#377eb8', '#ff7f00', '#4daf4a',
'#f781bf', '#a65628', '#984ea3',
'#999999', '#e41a1c', '#dede00']
CB_color_cycle = [CB_color_cycle[i] for i in [0, 1, 2, -2, 5, 4, 3, -3, -1]]
cbpal = sns.palettes.color_palette(palette=CB_color_cycle)
pal = sns.color_palette('colorblind')
pal[5], pal[6], pal[-2] = cbpal[5], cbpal[6], cbpal[-1]