Skip to content

Commit

Permalink
Add missing plot files
Browse files Browse the repository at this point in the history
  • Loading branch information
reslbesl authored Mar 26, 2021
1 parent 793660d commit 14fb702
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions synthetic_data/utils/plot_setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import matplotlib.pyplot as plt
import seaborn as sns
from palettable import cartocolors
from husl import hex_to_husl

colours = cartocolors.qualitative.Safe_10.hex_colors
cpalette = sns.color_palette(colours)
cpalette_light = sns.light_palette(hex_to_husl(colours[1]), input="husl")

cmap_qualitative = cartocolors.qualitative.Safe_10.mpl_colormap
cmap_light = sns.light_palette(hex_to_husl(colours[1]), input="husl", as_cmap=True)
cmap_diverging = sns.diverging_palette(h_neg=227, h_pos=4, s=73, l=60, n=12, as_cmap=True)
cmap_diverging.set_bad('white')

pltmarkers = ['o', 'X', 'D', 'P', 'X']

def set_style():
sns.set_palette(cpalette)
sns.set_style('darkgrid', {'axes.spines.right': False,
'axes.spines.top': False,
'axes.facecolor': '.93'})

plt.rcParams.update({
'font.family': 'serif',
'font.sans-serif': 'cm',
'text.usetex': True,
'font.size': 14,

'xtick.labelsize': 14,
'ytick.labelsize': 14,
'axes.labelsize': 16,
'axes.titlesize': 18,

'savefig.dpi': 75,

'figure.autolayout': False,
'figure.figsize': (13, 7),
'figure.titlesize': 20,

'lines.linewidth': 2.0,
'lines.markersize': 8,
'legend.fontsize': 14
})

0 comments on commit 14fb702

Please sign in to comment.