
Scientific Publication
- 43 installs
- 17 repo stars
- Updated May 14, 2026
- delphine-l/claude_global
Helps with ai & agent building tasks.
About
scientific-publication is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- scientific-publication
- AI & Agent Building
- AI-coding skill
Scientific Publication by the numbers
- 43 all-time installs (skills.sh)
- Ranked #7,921 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/delphine-l/claude_global --skill scientific-publicationAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 43 |
|---|---|
| repo stars | ★ 17 |
| Last updated | May 14, 2026 |
| Repository | delphine-l/claude_global ↗ |
What it does
Helps with ai & agent building tasks.
Files
Scientific Publication Figure Refinement
Expert guidance for systematically improving scientific figures through iterative refinement based on user feedback and publication requirements.
Supporting files in this directory:
- publication-standards.md - DPI, file formats, size specs, color accessibility
- multi-study-results.md - Writing integrated results from multi-study analyses and practical recommendations from complex trade-offs
- methodological-transparency.md - Dual approach pattern for figures vs statistics, outlier handling
- overleaf-packages.md - Creating production-ready Overleaf packages with templates and checklists
When to Use This Skill
- Improving figures based on reviewer or collaborator feedback
- Optimizing figure clarity and readability
- Ensuring all figure elements fit within bounds
- Deciding between layout alternatives (horizontal vs vertical panels)
- Preparing figures for high-impact publications
Iterative Figure Refinement Workflow
Standard Refinement Sequence
When improving a publication figure, follow this systematic approach:
1. Identify the Core Issue
Examples:
- "Violin plots look distorted on log scale"
- "P-values are cut off at the top"
- "Too much visual clutter, hard to see the data"
- "Text overlaps with data points"2. Fix the Visualization Type/Method
# Example: Replace inappropriate plot type
# Before: Violin plot on log scale (distorted)
ax.violinplot(data)
ax.set_yscale('log')
# After: Boxplot on log scale (accurate)
ax.boxplot(data)
ax.set_yscale('log')3. Improve Visual Clarity Systematically adjust element sizes:
# Point sizes: Reduce for dense data
# Start: s=60 (exploratory)
# End: s=25 (publication)
ax.scatter(..., s=25, alpha=0.5)
# Line widths: Thinner reduces clutter
# Start: linewidth=2.5
# End: linewidth=1.5
ax.plot(..., linewidth=1.5)
# Text sizes: Prevent overlap
# Start: fontsize=10-12
# End: fontsize=8-9
ax.text(..., fontsize=8)
# Error bar caps: Keep readable
ax.errorbar(..., capsize=5)4. Test Layout Alternatives
# Option A: Side-by-side panels
fig, axes = plt.subplots(1, 2, figsize=(16, 7))
# Pros: Direct left-right comparison
# Cons: Smaller individual panels
# Option B: Stacked vertically
fig, axes = plt.subplots(2, 1, figsize=(10, 14))
# Pros: Larger individual panels, easier to read details
# Cons: Harder to compare across panels
# Decision: Let user feedback guide choice
# Generate both, ask which is clearer5. Optimize Element Positioning Ensure all annotations fit within plot bounds:
# Calculate safe positioning
y_max = max([d.max() for d in data_list])
y_min = min([d.min() for d in data_list])
# Position annotations WITHIN bounds
y_pos = y_max * 0.92 # 92%, not 105% (which goes outside)
# Set explicit limits with headroom
ax.set_ylim(y_min * 0.95 if y_min > 0 else y_min - 5,
y_max * 1.05)Checklist for Publication Figures
Use this checklist before finalizing figures:
- [ ] Plot type appropriate for data distribution (no violin on log scale)
- [ ] All text readable at publication size (8-10 pt minimum)
- [ ] Statistical annotations visible and within plot bounds
- [ ] Legend clear and doesn't obscure data
- [ ] Axis labels descriptive with units
- [ ] Color scheme colorblind-friendly
- [ ] Line weights balanced (not too thick or thin)
- [ ] Point sizes optimized (visible but not overlapping)
- [ ] DPI adequate for publication (300 minimum)
- [ ] Layout tested (try both horizontal and vertical if applicable)
- [ ] File format publication-ready (PNG, PDF, or SVG)
Common Refinement Patterns
Pattern 1: Decluttering Dense Plots
Problem: Too many visual elements competing for attention
Solution sequence: 1. Reduce point size (60 -> 25) 2. Thin line widths (2.5 -> 1.5) 3. Increase transparency (alpha=0.8 -> 0.5) 4. Reduce font sizes (10 -> 8) 5. Remove grid or make it lighter (alpha=0.3)
Before/After test: Generate both versions, compare
Pattern 2: Fixing Overflow Issues
Problem: Annotations, legends, or labels cut off
Solutions:
# 1. Adjust annotation positions
y_pos = y_max * 0.92 # Within bounds
# 2. Use bbox_inches='tight' when saving
plt.savefig('figure.png', dpi=300, bbox_inches='tight')
# 3. Explicitly set limits
ax.set_ylim(min_val * 0.95, max_val * 1.05)
# 4. Move legend outside plot area
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
# 5. Reduce text size
ax.text(..., fontsize=8) # Down from 10Pattern 3: Multi-Panel Layout Optimization
Try both orientations:
# Version 1: Horizontal (side-by-side)
fig, axes = plt.subplots(1, 2, figsize=(16, 7))
plt.savefig('fig_horizontal.png', dpi=300, bbox_inches='tight')
# Version 2: Vertical (stacked)
fig, axes = plt.subplots(2, 1, figsize=(10, 14))
plt.savefig('fig_vertical.png', dpi=300, bbox_inches='tight')
# Present both to user, ask which is clearerDecision criteria:
- Horizontal: Better for direct comparison between panels
- Vertical: Better when each panel needs more space
- User context: Journal column width, presentation slides, etc.
Pattern 4: Iterative Statistical Annotation
Common issue: P-values positioned outside plot or overlapping with data
Solution:
# Calculate data range first
all_data = [data_dual, data_prialt] # All datasets in plot
y_max = max([d.max() for d in all_data if len(d) > 0])
# Position relative to actual data, not theoretical maximum
for i, (x_pos, comparison) in enumerate(comparisons):
stat, pval = stats.mannwhitneyu(...)
# Safe positioning
y_annotation = y_max * 0.92 # Below the top
# Format text
if pval < 0.001:
text = 'p < 0.001***'
elif pval < 0.01:
text = 'p < 0.01**'
elif pval < 0.05:
text = 'p < 0.05*'
else:
text = f'p = {pval:.3f} ns'
ax.text(x_pos, y_annotation, text, ha='center', fontsize=9)
# Set explicit limits to ensure annotations fit
ax.set_ylim(0, y_max * 1.05)Refinement Workflow Example
Real case: VGP Figure 5 improvement sequence
1. Initial version: 4 categories, violin plots on log scale
- Issue: Violin distortion, too complex
2. V1 refinement: Remove violin plots, keep boxplots
- Better, but still issues
3. V2 refinement: Simplify to 3 categories
- Clearer interpretation
4. V3 refinement: Reduce point sizes (60->25), thin lines (2.5->1.5)
- Less clutter
5. V4 refinement: Test vertical vs horizontal layout
- Horizontal clearer for this case
6. V5 refinement: Fix p-value positioning (105%->92% of y_max)
- All elements now visible
7. Final: Smaller text in statistics box (10->8)
- Publication ready
Total iterations: 7 versions over refinement process Result: Clear, accurate, publication-quality figure
Best Practices
1. Version Your Refinements
Keep working versions during major changes:
scripts/
plot_figure.py # Original
plot_figure_v2.py # After major change (layout)
plot_figure_final.py # Publication version2. Generate Alternatives in Parallel
When testing layout options:
# Save both versions
layouts = [
((1, 2), (16, 7), 'horizontal'),
((2, 1), (10, 14), 'vertical')
]
for (nrows, ncols), figsize, name in layouts:
fig, axes = plt.subplots(nrows, ncols, figsize=figsize)
# ... plot data ...
plt.savefig(f'figure_{name}.png', dpi=300, bbox_inches='tight')3. Document Each Refinement
"""
Figure 5 - Terminal Telomere Presence
Version history:
- v1: Initial 4-category version with violin plots
- v2: Removed violin plots (distortion on log scale)
- v3: Simplified to 3 categories (terminal only)
- v4: Reduced point/line sizes for clarity
- v5: Fixed p-value positioning
- final: Publication ready
Changes from v4 -> v5:
- P-value y-position: 1.05 * y_max -> 0.92 * y_max
- Added explicit y-axis limits: (y_min*0.95, y_max*1.05)
- Ensures all annotations visible within plot bounds
"""4. Get Feedback at Key Milestones
Don't over-iterate without input:
- After fixing major issues (wrong plot type): Show user
- After layout changes (horizontal vs vertical): Show user
- After final polish: Show user
5. Maintain Consistency Across Figure Set
If refining one figure, check if same improvements apply to others:
# Applied violin->boxplot fix to Figures 2, 7, 10, 11
# Applied size reductions consistently across all figures
# Used same color scheme throughoutSummary
Systematic refinement workflow: 1. Identify issue -> 2. Fix visualization -> 3. Improve clarity -> 4. Test layouts -> 5. Optimize positioning
Key principles:
- Iterate based on user feedback
- Test alternatives (show options)
- Document changes
- Apply lessons across figure set
- Meet publication standards
Common adjustments:
- Point sizes: 60 -> 25
- Line widths: 2.5 -> 1.5
- Font sizes: 10 -> 8
- Annotation positions: 105% -> 92% of max
- Always set explicit axis limits
For additional guidance, see the supporting files:
- Publication standards (DPI, formats, sizes): publication-standards.md
- Multi-study result writing: multi-study-results.md
- Methodological transparency: methodological-transparency.md
- Overleaf package creation: overleaf-packages.md
Methodological Transparency in Figures and Statistics
The Dual Approach Pattern
When presenting statistical analyses, you often need to balance:
- Visual clarity: Clean figures that communicate patterns effectively
- Statistical rigor: Conservative tests using all available data
Best Practice: Explicit Documentation
If figures show cleaned/filtered data while statistical tests use the full dataset:
1. Figure captions must include explicit notes:
\textbf{Note}: Statistical tests in Table X use [test name] on the full
dataset (n=XXX) for conservative assessment; this figure shows cleaned
data (outliers removed) for visual clarity only.2. Methods section must explain the dual approach:
\textbf{Visualization approach}: Figures show [cleaned data description]
for visual clarity. All statistical tests use [full dataset description]
for conservative and robust assessment. This dual approach ensures:
(1) clear visual communication, and (2) statistically conservative
hypothesis testing using all available data.
\textbf{Outlier definition}: [Specific criterion, e.g., "Points beyond
1.5x IQR from quartiles"]. Outlier removal applied only to visualization,
not to statistical testing.3. Why this matters:
- Prevents accusations of cherry-picking or p-hacking
- Shows scientific integrity and transparency
- Helps reviewers understand your methodology
- Demonstrates you're using conservative statistical practices
Example Use Case: Temporal Trends
Scenario: Scatter plots with many outliers obscure temporal trends
Solution:
- Figures: Remove outliers beyond 1.5x IQR for clean visualization
- Statistics: Use Spearman correlation on full dataset (all points)
- Documentation: Explicit notes in captions + Methods explanation
Template:
% In figure caption
Outliers removed for clarity (points beyond 1.5x IQR from quartiles).
\textbf{Note}: Statistical tests in Table S3 use Spearman correlation (rho)
on the full dataset for conservative assessment; this figure shows cleaned
data for visual clarity only.
% In Methods section
\textbf{Visualization approach}: Figures show scatter plots with regression
lines using cleaned data (outliers beyond 1.5x interquartile range removed)
for visual clarity. All statistical tests reported use the complete dataset
(including outliers) for conservative and robust assessment.When to Use This Pattern
Use when:
- Outliers obscure visual patterns but should be included in tests
- You want both clear communication and rigorous statistics
- Submitting to high-impact journals (Nature, Science, etc.)
- Anticipating reviewer questions about data filtering
Don't use when:
- Outliers are actual data errors (remove from both)
- Sample size is too small to justify removal
- The outliers ARE the interesting pattern
- Methods would be simpler without this complexity
Writing Integrated Results from Multi-Study Analyses
Challenge: When you have multiple parallel analyses (e.g., same metrics across 5 different populations/clades/conditions), how to present findings coherently without overwhelming readers.
Solution: Organize by pattern type first, then by study
Structure Pattern
1. Universal Patterns Section
- Present findings consistent across ALL studies first
- This establishes the "baseline truth" readers can rely on
- Use strong language: "consistently," "across all," "universal"
- Provide statistical evidence from multiple studies
2. Study-Specific Patterns Section
- Present deviations and unique findings by study
- Explicitly contrast with universal patterns
- Explain why this study differs (biological/technical context)
3. Cross-Study Comparisons Section
- Tables comparing effect sizes across studies
- Discussion of what drives variation
- Statistical power considerations
Example Structure (from clade-specific genome analysis):
## Universal Patterns Across All Vertebrates
### Gap Density: Architecture Dominates Curation
- Finding: [Universal pattern]
- Evidence: [Stats from all 5 clades]
- Interpretation: [Why this is universal]
### Telomere Detection: Technology-Limited
- [Similar structure]
## Clade-Specific Patterns
### Mammals: Dual Curation Provides Benefits
- Finding: [Unique to this clade]
- Contrast: [How this differs from universal]
- Interpretation: [Biological context]
### Birds: No N50 Benefit from Dual Curation
- [Unique pattern and explanation]
## Cross-Clade Comparisons
- [Table of effect sizes]
- [Discussion of variation]Benefits of This Structure
1. Readers get reliable findings first: Universal patterns are established before introducing complexity 2. Reduces cognitive load: Don't jump between studies repeatedly 3. Highlights what's generalizable: Universal section shows what works everywhere 4. Explains variation: Study-specific section explains why some results differ 5. Facilitates recommendations: Can give universal advice plus context-specific guidance
Writing Tips
For Universal Patterns:
- Lead with the finding, then provide evidence from multiple studies
- Use consistent statistical reporting across all supporting evidence
- Emphasize the consistency: "across all," "in every," "universal"
For Study-Specific Patterns:
- Explicitly state how this differs from universal patterns
- Provide biological/technical context for why this study is unique
- Don't just report statistics - explain the mechanism
For Statistical Power:
- Be explicit about which studies have sufficient power
- Note limitations in smaller studies
- Don't over-interpret null results from underpowered studies
Common Pitfalls to Avoid
- Don't: Report each study sequentially (Study 1 all results, Study 2 all results...)
- Do: Report by finding type (Finding A across all studies, Finding B across all studies...)
- Don't: Hide that some patterns aren't universal
- Do: Explicitly highlight when a pattern is study-specific and explain why
- Don't: Give equal weight to all findings
- Do: Emphasize universal patterns; note study-specific as "interesting variations"
Application Beyond Clade Analysis
This pattern works for any multi-study synthesis:
- Clinical trials across different populations
- Experimental treatments across multiple cell lines
- Algorithm performance across different datasets
- Policy interventions across different regions
Key principle: Organize by what readers need to know (universal vs specific) rather than by how you conducted the studies (study-by-study).
---
Providing Practical Recommendations from Complex Trade-offs
Challenge: When different methods excel at different outcomes, how to give clear guidance?
Pattern: "Depends on priority" recommendations with decision tree
Structure:
### For [Population/Context]
**Recommended**: [Method A]
- [Metric 1]: [Performance with stats]
- [Metric 2]: [Performance with stats]
- Use when: [Priority/constraint]
**Alternative**: [Method B]
- [Metric 1]: [Performance with stats]
- [Metric 2]: [Performance with stats]
- Use when: [Different priority/constraint]
**Note**: [Important caveat or key difference from other contexts]Example (from avian genome assemblies):
### For Avian Genomes
**Depends on priority**:
**For gap density minimization**: Phased assembly (dual or single curation)
- Dramatic 75-100x reduction in gaps vs Pri/alt
- Strong significance (p=1.87e-10)
**For chromosome assignment**: Pri/alt + Single curation
- Best assignment (98.93% median)
- Significantly better than phased approaches (p<0.001)
**Note**: Dual curation does NOT improve scaffold N50 in birds (p=0.378),
unlike mammals. Initial assemblies are already near-optimal due to
favorable genome characteristics.Benefits:
- Acknowledges trade-offs honestly
- Provides clear decision criteria
- Gives actionable guidance despite complexity
- Explains when different approaches are optimal
Creating Production-Ready Overleaf Packages
Package Structure
A complete Overleaf upload package should include:
Supplementary_Overleaf.zip
├── Supplementary_Information.tex # Main LaTeX document
├── figures/ # All figures in subdirectories
│ └── category_name/
│ ├── figure1.png # 300 DPI minimum
│ └── figure2.png
└── README.txt # Compilation instructionsREADME.txt Template
Include comprehensive documentation for collaborators/reviewers:
SUPPLEMENTARY INFORMATION - OVERLEAF PACKAGE
============================================
VERSION HISTORY:
---------------
- v1.0 (date): Initial version with [description]
- v2.0 (date): Added [features]
- v2.1 (CURRENT): [Latest changes]
FILES INCLUDED:
--------------
1. Supplementary_Information.tex - Main LaTeX document
2. figures/category/*.png - Figure files (list each)
COMPILATION INSTRUCTIONS:
------------------------
1. Upload this entire zip file to Overleaf (New Project → Upload Project)
2. Overleaf will automatically detect Supplementary_Information.tex
3. Click "Recompile" to generate the PDF
4. First compile: 60-90 seconds (figures at 300 DPI)
5. Subsequent compiles: 20-30 seconds
EXPECTED OUTPUT:
---------------
- ~XX-YY page PDF document
- N figures embedded at 300 DPI
- M statistical tables with real data
NATURE METHODS COMPLIANCE:
-------------------------
- Font: Helvetica/Arial (sans-serif)
- Figure resolution: 300 DPI minimum
- Figure format: PNG (acceptable, PDF preferred for final)
- All figures with detailed captions
- Statistical reporting complete and accurate
TROUBLESHOOTING:
---------------
If compilation fails:
1. Check compiler: Menu → Settings → Compiler = "pdfLaTeX"
2. Verify all PNG files uploaded successfully
3. Check directory structure: figures/category/*.png
4. Try compiling twice (needed for table of contents)
Created: [date]
For: [journal name] submission
Purpose: [brief description]Creation Workflow
1. Prepare directory structure:
mkdir -p Supplementary_Overleaf/figures/category_name2. Copy files:
cp Supplementary_Information.tex Supplementary_Overleaf/
cp figures/category/*.png Supplementary_Overleaf/figures/category/3. Create README.txt with compilation instructions
4. Create zip package:
cd Supplementary_Overleaf
zip -r ../Supplementary_Overleaf.zip .
cd ..
ls -lh Supplementary_Overleaf.zip5. Verify package contents:
unzip -l Supplementary_Overleaf.zip6. Test in Overleaf:
- Upload zip to new Overleaf project
- Verify compilation succeeds
- Check all figures render at correct resolution
- Verify all cross-references work
Version Control Documentation
Create a FINAL_PACKAGE_*.md file to track versions:
# Final Overleaf Package - [Description]
**Date**: YYYY-MM-DD (vX.X FINAL)
**Status**: READY FOR UPLOAD
## Version X.X - What Changed
### From vX.0 to vX.X:
**Changed**: [Description]
- **Was**: [Previous state]
- **Now**: [Current state]
**Why**:
- [Reason 1]
- [Reason 2]
## Package Contents (Final)
[List all files with sizes and purposes]
## Figure Details
[Description of each figure with key findings]
## Upload to Overleaf
### Quick Steps:
1. Go to https://www.overleaf.com
2. New Project → Upload Project
3. Select: `Package_Name.zip`
4. Click "Recompile"
5. Verify PDF appears
### Success Indicators:
- All figures visible
- All tables populated
- Cross-references work
- Professional appearanceQuality Checklist
Before finalizing package:
LaTeX document:
- All figures embedded with correct paths
- All tables populated (no placeholder values)
- All cross-references working (\ref{} commands)
- Methodological notes included where needed
- Professional formatting
Figures:
- All at 300 DPI minimum
- Correct file format (PNG/PDF)
- Clear, publication-quality appearance
- Proper directory structure
Documentation:
- README.txt with compilation instructions
- Version history documented
- Troubleshooting guide included
- Journal compliance noted
Package integrity:
- Reasonable file size (< 10 MB if possible)
- All files in correct locations
- Zip extracts cleanly
- No broken paths
Testing:
- Compiled successfully in Overleaf
- All figures render correctly
- PDF page count as expected
- No LaTeX errors or warnings
Publication Standards
DPI Requirements
- Screen/web: 150 DPI
- Print (standard): 300 DPI
- High-quality print: 600 DPI
File Formats
- Raster: PNG at 300 DPI (most journals accept)
- Vector: PDF or SVG (preferred for line plots, smaller file size, infinite zoom)
- Avoid: JPG (lossy compression, poor for scientific data)
Size Specifications
Check journal requirements:
- Single column: Usually 3.5 inches (89 mm) wide
- Double column: Usually 7 inches (178 mm) wide
- Height: Typically max 9-10 inches
Plan figsize accordingly:
# Single column figure
fig, ax = plt.subplots(figsize=(3.5, 4))
# Double column figure
fig, axes = plt.subplots(1, 2, figsize=(7, 3.5))Color Accessibility Requirements
Many journals now require accessibility statements for figures, including:
- Confirmation that color schemes are colorblind-safe
- Use of validated palettes (Okabe-Ito, Paul Tol)
- Alternative distinguishing features (patterns, shapes, labels)
Nature journals specifically recommend:
- Okabe-Ito palette for categorical data
- Avoiding red-green combinations
- Testing figures with colorblindness simulators
In Methods section, document your color choices:
"All figures use the Okabe-Ito colorblind-safe palette (Okabe & Ito, 2008) to ensure accessibility for readers with color vision deficiencies."
Reference: Okabe, M. and Ito, K. (2008) Color Universal Design (CUD): How to make figures and presentations that are friendly to colorblind people. https://jfly.uni-koeln.de/color/