Skip to content

Instantly share code, notes, and snippets.

@grinsted
Last active October 25, 2022 13:20
Show Gist options
  • Save grinsted/b7a4bce2252cb7423e2e82689669834f to your computer and use it in GitHub Desktop.
Save grinsted/b7a4bce2252cb7423e2e82689669834f to your computer and use it in GitHub Desktop.
a custom matplotlib style
figure.facecolor: white
figure.dpi: 200
savefig.dpi: 600
figure.figsize: 3.3,2.2
axes.facecolor: white
figure.subplot.bottom: 0.01
figure.subplot.left: 0.01
figure.subplot.right: 0.99
figure.subplot.wspace: 0.2
figure.subplot.hspace: 0.2
axes.xmargin: 0
axes.ymargin: 0
axes.zmargin: 0
axes.axisbelow: True
axes.edgecolor: 0.5
axes.labelcolor: 0.5
xtick.color: 0.5
ytick.color: 0.5
xtick.labelcolor: 0.5
ytick.labelcolor: 0.5
grid.color: .85
axes.linewidth: 0.25
grid.linewidth: 0.25
lines.linewidth: 1.5
lines.markersize: 3
axes.grid: True
axes.prop_cycle : cycler('color', ['E6194B', '4363D8', 'F58231', '42D4F4', 'F032E6', '3CB44B', 'FFE119', 'FABED4', '469990', 'DCBEFF', '9A6324', 'FFFAC8', '800000', 'AAFFC3', '000075', 'A9A9A9'])
legend.fancybox: True
lines.solid_capstyle: butt
patch.edgecolor: 00000080
patch.linewidth: 0.5
svg.fonttype: path
font.size: 7.0
image.cmap: plasma
errorbar.capsize: 1
xtick.major.size: 1.3 # major tick size in points
xtick.minor.size: 0.7 # minor tick size in points
xtick.major.width: 0.5 # major tick width in points
xtick.minor.width: 0.25 # minor tick width in points
xtick.major.pad: 1.5 # distance to major tick label in points
xtick.minor.pad: 1.4 # distance to the minor tick label in points
ytick.major.size: 1.3 # major tick size in points
ytick.minor.size: 0.7 # minor tick size in points
ytick.major.width: 0.5 # major tick width in points
ytick.minor.width: 0.25 # minor tick width in points
ytick.major.pad: 1.5 # distance to major tick label in points
ytick.minor.pad: 1.4 # distance to the minor tick label in points
axes.formatter.use_mathtext: True
axes.autolimit_mode: round_numbers
legend.labelcolor: .5
legend.fontsize: small
legend.borderpad: 0.2 # border whitespace
legend.labelspacing: 0.1 # the vertical space between the legend entries
legend.handlelength: 1.0 # the length of the legend lines
legend.handleheight: 0.8 # the height of the legend handle
legend.handletextpad: 0.4 # the space between the legend line and legend text
legend.borderaxespad: 0.3 # the border between the axes and legend edge
legend.columnspacing: 1
axes.titlepad: 2
axes.labelpad: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment