Skip to content

Instantly share code, notes, and snippets.

@jdherman
Created October 10, 2015 22:44
Show Gist options
  • Save jdherman/f662eb2039da5f7ea0a0 to your computer and use it in GitHub Desktop.
Save jdherman/f662eb2039da5f7ea0a0 to your computer and use it in GitHub Desktop.
plot style python
def init_plotting():
sns.set_style('whitegrid')
plt.rcParams['figure.figsize'] = (5, 4)
plt.rcParams['font.size'] = 13
plt.rcParams['font.family'] = 'OfficinaSanITCBoo'
# plt.rcParams['font.weight'] = 'bold'
plt.rcParams['axes.labelsize'] = 1.1*plt.rcParams['font.size']
plt.rcParams['axes.titlesize'] = 1.1*plt.rcParams['font.size']
plt.rcParams['legend.fontsize'] = plt.rcParams['font.size']
plt.rcParams['xtick.labelsize'] = plt.rcParams['font.size']
plt.rcParams['ytick.labelsize'] = plt.rcParams['font.size']
init_plotting()
# ...
plt.title('Whatever', family='OfficinaSanITCMedium', loc='left')
plt.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment