Skip to content

Instantly share code, notes, and snippets.

@DavidAce
Created October 26, 2021 08:12
Show Gist options
  • Save DavidAce/04d5b546dd71184ad665122bcfd52005 to your computer and use it in GitHub Desktop.
Save DavidAce/04d5b546dd71184ad665122bcfd52005 to your computer and use it in GitHub Desktop.
Matplotlib stylesheet for prb (WIP)
# Font sizes
# xx-small 5.79
# x-small 6.94
# small 8.33
# medium 10.0
# large 12.0
# x-large 14.4
# xx-large 17.28
# larger 12.0
# smaller 8.33
axes.labelsize : 10.0
axes.linewidth : 1.0
#axes.prop_cycle : cycler('color', ['0173b2', 'de8f05', '029e73', 'd55e00', 'cc78bc', 'ca9161', 'fbafe4', '949494', 'ece133', '56b4e9'])
axes.prop_cycle : cycler('color', ['000000', 'e69f00', '56b4e9', '009e73', 'f0e442', '0072b2', 'd55e00', 'cc79a7'])
figure.facecolor : 'white'
figure.figsize : 3.375, 3.00
#figure.figsize : 2.53125, 3.00 # 75% width
grid.alpha : 0.5
grid.color : k
grid.linestyle : -
## Dimensions as fraction of font size:
legend.fontsize : 8.33
legend.title_fontsize : 8.33
legend.frameon : True # if True, draw the legend on a background patch
legend.loc : center left
legend.borderpad : 0.25 # border whitespace
legend.labelspacing : 0.15 # the vertical space between the legend entries
legend.handlelength : 1.0 # the length of the legend lines
legend.handletextpad : 0.5 # the space between the legend line and legend text
legend.borderaxespad : 0.0 # the border between the axes and legend edge
legend.columnspacing : 0.5 # column separation
legend.framealpha : 0.8 # legend patch transparency
legend.facecolor : inherit # inherit from axes.facecolor; or color spec
legend.edgecolor : k # background patch boundary color
legend.fancybox : False # if True, use a rounded box for the
# legend background, else a rectangle
legend.shadow : False # if True, give background a shadow effect
xtick.direction : in
xtick.top : True
xtick.bottom : True
xtick.major.size : 5
xtick.minor.size : 2
xtick.major.width : 1.0
xtick.minor.width : 0.5
ytick.direction : in
ytick.left : True
ytick.right : True
ytick.major.size : 5
ytick.minor.size : 2
ytick.major.width : 1.0
ytick.minor.width : 0.5
# Special sauce
# Read more about the stix font here https://tex.stackexchange.com/questions/452133/font-used-by-revtex
text.usetex : true
font.size : 11
font.family : serif
font.serif : STIX
mathtext.fontset : stix
lines.linewidth : 1.1
lines.markersize : 5
axes.titlesize : small # Font size of subtplot title
## The figure subplot parameters. All dimensions are a fraction of the figure width and height.
figure.subplot.top : 1.00 # the top of the subplots of the figure (Make room for title and subtitle)
figure.subplot.left : 0.00 # the left side of the subplots of the figure
figure.subplot.bottom : 0.00 # the bottom of the subplots of the figure
figure.autolayout : False # Applies tight_layout
#figure.subplot.wspace : 0.2 # the amount of width reserved for space between subplots,
# expressed as a fraction of the average axis width
#figure.subplot.hspace : 0.2 # the amount of height reserved for space between subplots,
# expressed as a fraction of the average axis height
# Saving figures
## The default savefig parameters can be different from the display parameters
## e.g., you may want a higher resolution, or to make the figure
## background white
savefig.dpi : figure # figure dots per inch or 'figure'
savefig.facecolor : auto # figure face color when saving
savefig.edgecolor : auto # figure edge color when saving
savefig.format : pdf # {png, ps, pdf, svg}
savefig.bbox : tight # {tight, standard}
# 'tight' is incompatible with pipe-based animation
# backends (e.g. 'ffmpeg') but will work with those
# based on temporary files (e.g. 'ffmpeg_file')
savefig.pad_inches : 0.0 # Padding to be used when bbox is set to 'tight'
#savefig.directory : ~ # default directory in savefig dialog box,
# # leave empty to always use current working directory
#savefig.transparent: False # setting that controls whether figures are saved with a
# transparent background by default
#savefig.orientation: portrait # Orientation of saved figure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment