reporting/figure-export/SKILL.md
Exports publication-ready figures in various formats with proper resolution, sizing, and typography. Use when preparing figures for journal submission, creating vector graphics for presentations, or ensuring consistent figure styling across analyses.
npx skillsauth add GPTomics/bioSkills bio-reporting-figure-exportInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Reference examples tested with: ggplot2 3.5+, matplotlib 3.8+
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signaturespackageVersion('<pkg>') then ?function_name to verify parametersIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"Export figures for publication" -> Save plots as high-resolution PDF/SVG/TIFF with journal-required DPI and dimensions.
fig.savefig('fig.pdf', dpi=300, bbox_inches='tight')ggsave('fig.pdf', width=7, height=5, units='in')import matplotlib.pyplot as plt
# Set publication defaults
plt.rcParams.update({
'font.size': 8,
'font.family': 'Arial',
'axes.linewidth': 0.5,
'lines.linewidth': 1,
'figure.dpi': 300
})
fig, ax = plt.subplots(figsize=(3.5, 3)) # Single column width
# ... create plot ...
# Save in multiple formats
fig.savefig('figure1.pdf', bbox_inches='tight', dpi=300)
fig.savefig('figure1.png', bbox_inches='tight', dpi=300)
fig.savefig('figure1.svg', bbox_inches='tight')
library(ggplot2)
p <- ggplot(data, aes(x, y)) + geom_point() +
theme_classic(base_size = 8) +
theme(text = element_text(family = 'Arial'))
# PDF for vector graphics
ggsave('figure1.pdf', p, width = 3.5, height = 3, units = 'in')
# High-res PNG
ggsave('figure1.png', p, width = 3.5, height = 3, units = 'in', dpi = 300)
# TIFF (some journals require)
ggsave('figure1.tiff', p, width = 3.5, height = 3, units = 'in',
dpi = 300, compression = 'lzw')
| Journal Type | Format | Resolution | Width | |--------------|--------|------------|-------| | Most journals | PDF/EPS | Vector | 3.5" (1-col), 7" (2-col) | | Online-only | PNG | 300 DPI | Variable | | Print | TIFF | 300-600 DPI | Column width |
import matplotlib.pyplot as plt
from matplotlib.gridspec import GridSpec
fig = plt.figure(figsize=(7, 5)) # Two-column width
gs = GridSpec(2, 3, figure=fig)
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[0, 1:])
ax3 = fig.add_subplot(gs[1, :])
# Add panel labels
for ax, label in zip([ax1, ax2, ax3], ['A', 'B', 'C']):
ax.text(-0.1, 1.1, label, transform=ax.transAxes,
fontsize=10, fontweight='bold')
fig.savefig('figure_multipanel.pdf', bbox_inches='tight')
testing
Analyze multi-modal single-cell data (CITE-seq, Multiome, spatial). Use when working with data that measures multiple modalities per cell like RNA + protein or RNA + ATAC. Use when analyzing CITE-seq, Multiome, or other multi-modal single-cell data.
data-ai
Analyze metabolite-mediated cell-cell communication using MeboCost for metabolic signaling inference between cell types. Predict metabolite secretion and sensing patterns from scRNA-seq data. Use when studying metabolic crosstalk between cell populations or metabolite-receptor interactions.
development
Find marker genes and annotate cell types in single-cell RNA-seq using Seurat (R) and Scanpy (Python). Use for differential expression between clusters, identifying cluster-specific markers, scoring gene sets, and assigning cell type labels. Use when finding marker genes and annotating clusters.
development
Reconstruct cell lineage trees from CRISPR barcode tracing or mitochondrial mutations. Use when studying clonal dynamics, cell fate decisions, or developmental trajectories.