figure-export

Export R plots as PDF, PNG, and SVG with embedded fonts.

2|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/MusserLab/lab-claude-skills --skill figure-export
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: figure-export
Source: https://github.com/MusserLab/lab-claude-skills/tree/main/skills/figure-export
Command: npx skills add https://github.com/MusserLab/lab-claude-skills --skill figure-export

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generating high-quality, publication-ready figures from R plots across multiple formats can be tedious and error-prone when fonts, text editability, and dimensions must be controlled for manuscripts and editors.

Core Features & Use Cases

  • Multi-format exports: Save plots as PDF (with cairo_pdf for font embedding), PNG (300 dpi), and SVG (svglite with fix_text_size = FALSE) to guarantee quality and editability.
  • SVG text editability: Prevent textLength and lengthAdjust attributes by configuring svglite to keep text editable in Inkscape.
  • Guided consistency for manuscripts: Standardize fonts (Arial) and dimensions to ensure panels align when composing multi-figure layouts; includes practical code snippets.

Quick Start

Save your current ggplot or base R plot as PDF, PNG, and SVG using the recommended ggsave workflows.

Frequently Asked Questions about figure-export

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export ggplot2 plots as editable SVG with proper text handling?

To export ggplot2 plots as editable SVG, use svglite with fix_text_size = FALSE to prevent textLength and lengthAdjust attributes, keeping text editable in vector graphics editors like Inkscape.

What's the best way to embed fonts when exporting R graphics to PDF for publication?

For embedding fonts in R graphics PDF exports, use cairo_pdf through ggsave, ensuring all text and typefaces are properly embedded in the final publication-ready PDF file for manuscript submission.

How do I standardize figure dimensions and fonts across multiple R plots for manuscript layout?

Standardize figure dimensions and fonts across R plots by configuring consistent Arial font settings and dimension parameters during export, ensuring multi-panel figures align properly when composed together for manuscripts.

Can I export both base R plots and ggplot2 plots to publication-ready formats?

Yes, you can export both base R plots and ggplot2 plots to publication-ready formats using ggsave workflows, generating high-quality PDF, PNG at 300 dpi, and SVG outputs for manuscripts and presentations.

Why does my SVG text from svglite have textLength attributes that break Inkscape editing?

SVG text exports from svglite include textLength and lengthAdjust attributes by default; configuring svglite with fix_text_size = FALSE prevents these attributes, maintaining text editability in Inkscape.