Skip to content

Instantly share code, notes, and snippets.

@rxa254
Last active May 1, 2020 07:14
Show Gist options
  • Save rxa254/ecf399c88b6f0a56a94b99924026f046 to your computer and use it in GitHub Desktop.
Save rxa254/ecf399c88b6f0a56a94b99924026f046 to your computer and use it in GitHub Desktop.
beautiful - Matplotlib plot settings (my fav)
import matplotlib.pyplot as plt
plt.rcParams.update({'text.usetex': False,
'lines.linewidth': 4,
'font.family': 'serif',
'font.serif': 'Palatino',
'font.size': 22,
'xtick.direction': 'in',
'ytick.direction': 'in',
'xtick.labelsize': 'medium',
'ytick.labelsize': 'medium',
'axes.labelsize': 'medium',
'axes.titlesize': 'medium',
'axes.grid.axis': 'both',
'axes.grid.which': 'both',
'axes.grid': True,
'grid.color': 'xkcd:beige',
'grid.alpha': 0.253,
'lines.markersize': 12,
'legend.borderpad': 0.2,
'legend.fancybox': True,
'legend.fontsize': 'small',
'legend.framealpha': 0.8,
'legend.handletextpad': 0.5,
'legend.labelspacing': 0.33,
'legend.loc': 'best',
'figure.figsize': ((12, 8)),
'savefig.dpi': 140,
'savefig.bbox': 'tight',
'pdf.compression': 9})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment