bio-data-visualization-ggplot2-fundamentals
Build publication-quality figures in R with ggplot2 using the grammar of graphics (data + aesthetics + geometries + scales + facets + themes) with CVD-safe palettes, cairo_pdf TrueType embedding, programmatic aes via tidy evaluation, and the theme_classic publication baseline. Use when producing static figures in R for papers, presentations, or reports.
npx skills add BioTender-max/awesome-bio-agent-skills --skill ggplot2-fundamentals --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
## Version Compatibility Reference examples tested with: ggplot2 3.5+, scales 1.3+, ggrepel 0.9.5+, ggtext 0.1.2+, viridis 0.6+, scico 1.5+, patchwork 1.2+ (axes='collect' requires 1.2.0+). Before using code patterns, verify installed versions match. If versions differ: - R: `packageVersion('<pkg>')` then `?function_name` to verify parameters If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # ggplot2 Fundamentals **"Build a publication figure in R"** -> Express the figure as **data + aesthetic mappings + one or more geometries + scales + facets + theme**. The grammar of graphics (Wilkinson 2005; Wickham 2010 *J Comput Graph Stat* 19:3) makes each visual element separately addressable — change scales without rewriting geoms; swap geom_point for geom_violin without touching aesthetics. - R: `ggplot(data, aes(x, y)) + geom_point() + scale_color_manual(...) + theme_classic()` - Programmatic: `aes(x = .data[[var]])` for tidy-eval; `!!sym(var)` for older base R style ## The Three Modern Defaults 1. **theme_classic() + remove panel grid + Okabe-Ito palette** as the publication bas
- Version Compatibility
- The Three Modern Defaults
- Grammar in Layers
- Common Geoms
- Aesthetic Mappings
- Scales
- Facets
- Theme
- Programmatic Plots (Tidy Evaluation)
- Labels with ggtext (rich-text)
- Saving — TrueType Embedding
- Common Failure Modes
- Default ggsave fonts not embedded
- Mapping vs constant aesthetic confusion
What does the bio-data-visualization-ggplot2-fundamentals skill do?
Build publication-quality figures in R with ggplot2 using the grammar of graphics (data + aesthetics + geometries + scales + facets + themes) with CVD-safe palettes, cairo_pdf TrueType embedding, programmatic aes via tidy evaluation, and the theme_classic publication baseline. Use when producing static figures in R for papers, presentations, or reports.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill ggplot2-fundamentals --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
