Skip to content

Instantly share code, notes, and snippets.

@snsinfu
Last active January 19, 2021 07:45
Show Gist options
  • Select an option

  • Save snsinfu/4d666132fb89534e8ace651b5f87e33f to your computer and use it in GitHub Desktop.

Select an option

Save snsinfu/4d666132fb89534e8ace651b5f87e33f to your computer and use it in GitHub Desktop.
A clean-looking matplotlib style
# Figure
figure.figsize: 3.6, 2.0
figure.dpi: 150
figure.frameon: True
figure.edgecolor: none
figure.facecolor: white
figure.autolayout: False
figure.constrained_layout.use: True
# Savefig
savefig.format: png
savefig.dpi: 300
savefig.edgecolor: none
savefig.facecolor: white
savefig.transparent: True
savefig.bbox: tight
savefig.pad_inches: 0.1
# Subplot
figure.subplot.left: 0.03
figure.subplot.bottom: 0.03
figure.subplot.right: 0.97
figure.subplot.top: 0.97
# Axes
axes.linewidth: 1.0
axes.edgecolor: black
axes.facecolor: white
axes.labelcolor: black
axes.labelpad: 4.0
axes.titlepad: 6.0
axes.spines.top: False
axes.spines.right: False
# Font and color
font.family: sans-serif
font.size: 10.0
axes.prop_cycle: cycler('color', ['2c61e8', 'e23c2d', '7dd80d', 'f4e218', '23e2ef', '9f4fef', 'ef4fa2', '777777'])
# Grid
axes.grid: False
axes.grid.axis: both
axes.grid.which: major
grid.alpha: 1.0
grid.color: 000000
grid.linestyle: :
grid.linewidth: 0.5
# Legend
legend.loc: best
legend.frameon: False
legend.fancybox: False
legend.shadow: False
legend.edgecolor: none
legend.facecolor: inherit
legend.framealpha: 1
# Lines
lines.color: black
lines.linestyle: -
lines.linewidth: 1
lines.marker: None
patch.edgecolor: black
patch.facecolor: C0
patch.linewidth: 1
@snsinfu
Copy link
Author

snsinfu commented Jan 19, 2021

sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment