Last active
July 10, 2026 17:11
-
-
Save brainfo/518a5dc796d897cb7a3f40cc66aa3049 to your computer and use it in GitHub Desktop.
science.mplstyle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Matplotlib style — Science / AAAS figure specification | |
| # Widths 5.7 / 12.1 / 18.4 cm; Helvetica preferred (Nimbus Sans = URW Helvetica metric clone, | |
| # the only Helvetica-metric font installed here); text ~7 pt, never < 5 pt; symbols >= 6 pt. | |
| # Load with: plt.style.use('style/science.mplstyle') | |
| # --- Fonts (Helvetica is absent on this machine; Nimbus Sans matches its metrics) --- | |
| font.family: sans-serif | |
| font.sans-serif: Nimbus Sans, TeX Gyre Heros, Arimo, Helvetica, Arial, DejaVu Sans | |
| font.size: 7 # base text ~7 pt at final size | |
| # --- Keep text as editable vector, never outlines (Science: fonts embedded, text not outlined) --- | |
| pdf.fonttype: 42 | |
| ps.fonttype: 42 | |
| svg.fonttype: none | |
| # --- Axes & labels --- | |
| axes.titlesize: 7 | |
| axes.labelsize: 7 | |
| axes.linewidth: 0.5 # within Nature 0.25-1 pt / Cell 0.5-1.5 pt | |
| axes.grid: False # no gridlines (Nature graph rule) | |
| axes.spines.top: False | |
| axes.spines.right: False | |
| axes.labelpad: 2.0 | |
| axes.titlepad: 3.0 | |
| # --- Ticks (symbols/minor text >= 6 pt) --- | |
| xtick.labelsize: 6 | |
| ytick.labelsize: 6 | |
| xtick.major.width: 0.5 | |
| ytick.major.width: 0.5 | |
| xtick.major.size: 2.5 | |
| ytick.major.size: 2.5 | |
| xtick.direction: out | |
| ytick.direction: out | |
| # --- Legend --- | |
| legend.fontsize: 6 | |
| legend.frameon: False | |
| legend.handlelength: 1.2 | |
| legend.borderpad: 0.3 | |
| legend.columnspacing: 1.0 | |
| # --- Lines & markers --- | |
| lines.linewidth: 1.0 | |
| lines.markersize: 3.0 | |
| # --- Output: vector by default, high-res raster where a layer opts in --- | |
| figure.dpi: 600 | |
| savefig.dpi: 600 | |
| savefig.bbox: tight | |
| savefig.pad_inches: 0.01 | |
| savefig.transparent: False | |
| figure.facecolor: white | |
| axes.facecolor: white | |
| # --- Colour: default cycle = Okabe-Ito CVD-safe categorical (Wong 2011, Nat Methods) --- | |
| axes.prop_cycle: cycler('color', ['E69F00','56B4E9','009E73','F0E442','0072B2','D55E00','CC79A7','000000']) | |
| image.cmap: viridis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment