Skip to content

Instantly share code, notes, and snippets.

@markusdumke
Created November 3, 2017 16:25
Show Gist options
  • Save markusdumke/572e2a8546c54b322b48c0c792799b77 to your computer and use it in GitHub Desktop.
Save markusdumke/572e2a8546c54b322b48c0c792799b77 to your computer and use it in GitHub Desktop.
matplotlib style in the style of ggplot with white background (theme_bw)
# ggplot style with white background
# adapted from http://www.huyng.com/posts/sane-color-scheme-for-matplotlib/
patch.linewidth: 1
patch.facecolor: 348ABD # blue
patch.edgecolor: EEEEEE
patch.antialiased: True
font.size: 10.0
axes.facecolor: white # E5E5E5
axes.edgecolor: white
axes.linewidth: 0.5
axes.grid: True
axes.titlesize: x-large
axes.labelsize: large
axes.labelcolor: black # 555555
axes.axisbelow: True # grid/ticks are below elements (e.g., lines, text)
axes.prop_cycle: cycler('color', ['E24A33', '348ABD', '988ED5', '777777', 'FBC15E', '8EBA42', 'FFB5B8'])
# E24A33 : red
# 348ABD : blue
# 988ED5 : purple
# 777777 : gray
# FBC15E : yellow
# 8EBA42 : green
# FFB5B8 : pink
xtick.color: 555555
ytick.color: 555555
ytick.direction: out
grid.color: 0.9
grid.linestyle: - # solid line
figure.facecolor: white
figure.edgecolor: 0.50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment