Let’s be completely honest: nothing breaks my heart quite like seeing ground-breaking, months-in-the-making lab data presented in a figure that looks like it was generated by default Excel 2003 or drawn on the back of a napkin.
You can spend half a year perfecting a fabrication process, running finite element simulations, or characterizing novel materials, but if your figures are messy, pixelated, or illegible, reviewers and readers will subconsciously downgrade the quality of your science. Your figures are the storefront of your paper. Most researchers will look at your title, read the abstract, skim the figures, and only then decide if the text is worth their time.
Making publication-ready figures is not an innate artistic gift—it is a technical discipline with clear rules. In our lab, we treat figure preparation like an engineering workflow: structured, reproducible, and precise.
Here is the exact pipeline you should follow to take raw Python plots and turn them into cohesive, Nature Materials- and Nature Communications-grade manuscript figures.
1. The Master Rule
Before you write a single line of code or touch a design tool, remember the golden rule of publication figures: Always design your figures at the exact physical dimensions they will occupy in print.
For standard multi-column journals (like Nature, Science, or Advanced Materials):
- Single-column figure width: $\approx$ 89 mm (3.5 inches)
- 1.5-column figure width: $\approx$ 120–135 mm (4.7–5.3 inches)
- Double-column (full page) width: $\approx$ 180 mm (7.1 inches)
If you generate a plot with a default 10×8-inch canvas and shrink it down in Adobe Illustrator to fit a 3.5-inch column, your font shrinks into microscopic dust, line weights vanish, and tick marks disappear. You must generate the plot at its target physical dimension from the start.
2. Setting Up Matplotlib: The FlexiLab Standard
Never rely on Matplotlib’s default settings. In our lab, we standardize our visual identity using a custom stylesheet (natMat_FLEXILAB.mplstyle) paired with exact runtime parameters to deliver crisp typography and publication-grade line weights.
The Lab's Core Script Setup
Include this baseline configuration block at the top of every analysis script or Jupyter notebook:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib import font_manager as fm
from matplotlib.ticker import MultipleLocator
# 1. Load Custom Lab Typography
font_path = "fonts/GraphikNaturel-Regular.ttf"
fm.fontManager.addfont(font_path)
# 2. Runtime Configuration Overrides
plt.rcParams['mathtext.default'] = 'regular' # Render math/Greek characters upright
plt.rcParams["image.composite_image"] = False # Prevent clipping/rasterization artifacts
plt.style.use('natMat_FLEXILAB.mplstyle') # Official FlexiLab stylesheet
# 3. Standardized Lab Color Palettes
colors = ['#0c5da5', '#00b945', '#ff9500', '#ff2c00', '#845b97', '#474747', '#9e9e9e']
scienceColors = ['#ca2015', '#2015ca']
natMatColors = ['#c21500', '#336699']
Complete Plotting Example
Here is how to generate a clean, publication-ready double-trace plot with shaded confidence bands:
# Create sample dataset
x = np.linspace(1000, 3000, 200)
y_closed = 8000 * np.exp(-((x - 1580) / 120)**2) + 2000 * np.exp(-((x - 2680) / 150)**2)
y_open = 9500 * np.exp(-((x - 1580) / 100)**2) + 7500 * np.exp(-((x - 2680) / 130)**2)
# Initialize canvas (dimensions defined in .mplstyle)
fig, ax = plt.subplots(1, 1, tight_layout=True, linewidth=0)
# Plot experimental traces
ax.plot(x, y_closed, '-', label='closed-end', color=natMatColors[0])
ax.plot(x, y_open, '-', label='open-end', color=natMatColors[1])
# Annotate characteristic peaks
ax.text(1590, 9600, 'G', fontsize=6.5, color='#088f8f')
ax.vlines(x=1580, ymin=-200, ymax=9500, colors='#088f8f', linestyle='dotted', linewidth=0.75)
ax.text(2720, 7800, '2D', fontsize=6.5, color='#088f8f')
ax.vlines(x=2680, ymin=-200, ymax=7700, colors='#088f8f', linestyle='dotted', linewidth=0.75)
# Formatting axes
ax.set_xlabel("Raman shift (cm$^{-1}$)")
ax.set_ylabel("Normalized intensity (-)", linespacing=0.8, labelpad=2)
ax.set_xlim(1000, 3000)
ax.set_ylim(-300, 11000)
ax.xaxis.set_major_locator(MultipleLocator(1000))
ax.minorticks_off()
ax.set_yticks([]) # Hide Y-ticks for normalized intensity
ax.legend(loc='upper right', ncol=1)
# Export high-fidelity vector assets for Illustrator
fig.savefig('Images/RamanSpectra.pdf', transparent=True)
fig.savefig('Images/RamanSpectra.svg', format='svg', transparent=True, dpi=1200)
plt.close(fig)
3. Color Strategy & Multimodal Harmony
Color in scientific figures is not decoration; it is information architecture.
- Harmonize Graphs with Physical Images: Figures look their absolute best when the colors used in line plots, scatter graphs, and bar charts directly match the dominant colors of the physical photographs, SEM micrographs, or schematics within the same figure.
- Avoid Default Clashing: Never default to arbitrary software colormaps next to experimental photography. Sample dominant tones directly from your micrographs or schematics (e.g., matching a blue fluorescence channel or a red elastomeric layer to the corresponding plot lines) to create an immediate, intuitive visual link for the reader.
- Functional Color Consistency: If “Device A” is rendered in
#c21500(crimson) in panel a’s 3D schematic, its characterization curves in panels b, c, and d must use the exact same#c21500tone across all axes.
4. Scientific Image Integrity and Export Standards
All photographic panels, optical micrographs, and electron microscopy (SEM/TEM) images must adhere to strict integrity and preparation protocols:
-
Permissible Modifications:
-
Experimental images cannot be altered by any operation other than simple rotation and cropping.
-
Cropping is strictly permitted only to focus the reader’s attention on the relevant region of interest, never to omit, conceal, or crop out artifacts, defects, or confounding experimental features.
-
Contrast, brightness, and color adjustments must be applied linearly across the entire image frame and must never obscure or exaggerate the underlying physical reality.
-
Color Space (Strictly RGB):
-
Always export and assemble all panels in RGB color mode.
-
Do not use CMYK or CMYB color spaces. Modern journal production systems convert from RGB, and assembling in CMYK introduces muddy hue shifts, dull tones, and clipping in digital viewers.
-
Resolution Benchmarks:
-
All raster micrographs and photographs must have a minimum resolution of 300 dpi at their final 100% print scale.
-
Vector plots and line art should always be exported as vector formats (
.pdfor.svg) withtransparent=Trueto maintain infinite scalability and crisp text rendering.
5. The Adobe Illustrator Assembly Workflow
Once individual sub-panels are generated, assemble the composite multi-panel figure in Adobe Illustrator using a non-destructive, modular structure.
Why You Must Link, Not Embed
Do not copy and paste graphs directly into Illustrator or embed raw vector groups immediately. Instead, use Linked Assets:
-
In Illustrator, create an artboard sized to the target journal width (e.g.,
89 mmfor single-column,180 mmfor double-column). -
Go to File $\rightarrow$ Place…
-
Select your exported plot file (
figure_2a.pdforfigure_2a.png). -
Ensure the “Link” checkbox is checked before placing.
[ Python Script ] ====(exports)====> figure_2a.pdf
|
(Linked)
v
[ Adobe Illustrator ]
(Auto-Updates!)
The Superpower of Linked Assets
When a reviewer or advisor asks to rescale an axis, tweak tick marks, or re-filter raw data, you do not need to rebuild the layout:
-
Modify your Python script.
-
Re-run it to overwrite
figure_2a.pdf. -
Switch to Illustrator: click Yes when prompted to update modified links.
-
Your entire multi-panel canvas refreshes automatically while preserving panel alignments, scale bars, and panel labels (a, b, c).
6. Structuring Multi-Panel Layouts (a, b, c, d)
To maintain a clean visual hierarchy across composite figures:
- Panel Labels: Use bold, lowercase sans-serif letters (a, b, c, d) sized at 8–9 pt. Place them in the upper-left corner of each sub-panel with uniform alignment offsets (e.g., 2 mm from borders).
- Typography Hierarchy:
-
Panel letters (a, b, c): 8–9 pt Bold
-
Axis labels and titles: 6.5–7.5 pt Regular / Semibold
-
Tick labels, legends, scale bar callouts: 5.5–6.5 pt Regular
-
Minimum readable font size in final print: 5 pt (never go lower).
- Alignment: Use Illustrator’s
Alignpanel (Window -> Align). Set Align To: Key Object and enforce uniform distribution gaps (e.g., exactly3.0 mmbetween adjacent sub-panels). - Scale Bars Over Micrographs: Draw scale bars as vector rectangles directly in Illustrator over the micrograph. Add the physical length annotation (e.g., “50 $\mu$m”) directly above or below the bar in 6 pt bold text with a high-contrast stroke or background fill if the underlying image is busy.
Pre-Submission Checklist
Before sending your figures for review or manuscript compilation, verify:
