Scientific Figures for Research Papers
Figures are more than half of paper writing. Good figures elevate your research impact.
Complex figures combining multiple data types and visualizations
TEM + XAS + Conversion + Radar plot
Conversion + Raman + XPS + Correlations
DFT calculations, MD simulations, and ML results
3D vacancy map + violin plot + time series + bar chart
Atomic structures + phase diagram + energy profile
C-H/C-C bond breaking barriers
Density of States (DOS)
ML: Parity plot + Violin + SHAP
COHP bonding analysis
Microkinetic: TOF + Coverage + Selectivity
Reaction coordinate diagram
Automation in the LLM Era
Python + LLM = Efficient, reproducible, beautiful figures
Structures + thermodynamics + energy diagram
Reaction coordinate with multiple pathways
Polarization curves (j vs E)
Volcano plot + mechanism + charge density
Setup, Matplotlib, Data Handling
# Create environment
conda create -n mpl python=3.9
conda activate mpl
# Install packages
conda install matplotlib pandas numpy
pip install ase # optionalimport matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# For custom fonts
import matplotlib.font_manager as fmfig, ax = plt.subplots(figsize=(8, 6))
ax.plot(x, y, color='blue', lw=2)
# Multiple subplots
fig, axes = plt.subplots(2, 3)
axes[0, 0].plot(x, y)# Line plot
ax.plot(x, y, 'b-', label='data')
# Scatter plot
ax.scatter(x, y, s=50, alpha=0.7)
# Fill between
ax.fill_between(x, y1, y2, alpha=0.3)# Labels and limits
ax.set_xlabel('Temperature (C)')
ax.set_ylabel('Conversion (%)')
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
# Legend
ax.legend(loc='upper right')# Always use tight_layout first!
plt.tight_layout()
# Save with options
plt.savefig('fig.png', dpi=300,
bbox_inches='tight')
plt.savefig('fig.svg') # vector# Vectorized operations (fast!)
data = np.array([1, 2, 3, 4, 5])
squared = data**2 # all at once
# Create arrays
x = np.linspace(0, 10, 100)
x = np.arange(0, 10, 0.1)
y = np.sin(x)df = pd.read_excel('data.xlsx',
sheet_name='Sheet1')
# Select columns
x = df.iloc[:, 0] # by position
y = df['col_name'] # by name
# Clean data
df = df.dropna() # remove NaNAI-Powered Figure Generation
# System prompt for consistent figures
fs = 12 # font size
font_props = fm.FontProperties(family='Arial', size=fs)
colors = ['#77AEB3', '#E5885D', '#C7C4B5', '#A1C2DE', '#B4944B']
os.makedirs('./output', exist_ok=True)def format_axis(ax, xlabel, ylabel):
ax.set_xlabel(xlabel, fontproperties=font_props)
ax.set_ylabel(ylabel, fontproperties=font_props)
def save_plot(filename):
plt.tight_layout()
plt.savefig(f'./output/{filename}', dpi=300, bbox_inches='tight')
# Complete example
x = np.linspace(0, 10, 100)
fig, ax = plt.subplots(figsize=(8, 6))
ax.plot(x, np.sin(x), 'b-', lw=2, label='sin(x)')
ax.plot(x, np.cos(x), 'r--', lw=2, label='cos(x)')
ax.fill_between(x, np.sin(x), np.cos(x), where=(np.sin(x)>np.cos(x)), alpha=0.3)
format_axis(ax, 'X values', 'Y values')
ax.legend()
save_plot('trig.svg')Arrays for speed, DataFrames for Excel/CSV
fig/ax pattern, consistent styling, proper saving
Cursor for fine-tuning, Claude Code for automation
Automate, Iterate, Perfect
Good figures take practice
Automation saves time for creativity
LLMs are your coding partners
Keep coding. Keep visualizing. Keep publishing.