ggplot2

Creates advanced R plots with ggplot2 4.0+ features and theme customization.

13|2|Updated Jan 13, 2026
One-click install
npx skills add https://github.com/jsperger/llm-r-skills --skill ggplot2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ggplot2
Source: https://github.com/jsperger/llm-r-skills/tree/main/skills/ggplot2
Command: npx skills add https://github.com/jsperger/llm-r-skills --skill ggplot2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ggplot2 provides a powerful, layered grammar of graphics system in R, but mastering the 4.0+ features and theme customization can be complex.

Core Features & Use Cases

  • S7 migration and property access (@) for robust code.
  • Theme defaults, ink/paper/accent controls, and element_geom() utilities for consistent styling.
  • Discrete and continuous scales, facet layouts, and label enhancements for publication-ready visuals.

Quick Start

Use a minimal R snippet to create a basic plot with mpg data, apply a theme, and add a facet.

Frequently Asked Questions about ggplot2

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

FAQPage Schema
How do I use S7 property access in ggplot2 for data visualization?

S7 property access in ggplot2 uses the @ operator for robust object property handling. This modern R approach replaces older S3/S4 methods, ensuring reliable theme and scale customization during data visualization tasks.

What is the best way to customize ggplot2 themes for publication-ready graphics?

Customizing ggplot2 themes for publication-ready graphics involves setting theme defaults, ink/paper/accent controls, and element_geom() utilities. These features ensure consistent styling across reporting and data exploration visualizations.

Can I use element_geom() and theme_sub_* shortcuts in R ggplot2 4.0+?

Yes, element_geom() and theme_sub_* shortcuts are available in ggplot2 4.0+ for R. They simplify theme customization by providing utilities that streamline applying consistent visual styling rules.

How do I create facet layouts and discrete scales in ggplot2?

Creating facet layouts and discrete scales in ggplot2 involves applying facet functions for multi-panel data visualization and scale functions for categorical data mapping. This supports structured reporting and exploration.

Does ggplot2 4.0+ support label dictionaries and new position aesthetics?

Yes, ggplot2 4.0+ supports label dictionaries for enhanced text mapping and new position aesthetics for refined plot layouts. These features improve the clarity of data visualization outputs in R.