Skip to content

New roxygen tag: @aesthetics #6437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 19, 2025
Merged

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Apr 22, 2025

This PR aims to fix #6436.

Briefly, it introduces a new @aesthetics roxygen tag that takes a ggproto object (Stat/Geom/Position) and makes a little section declaring the required/optional aesthetics.

I've tested it a little bit, but extensions should be able to use the tag for their objects too. For reasons I don't quite understand, the new section appears after the examples in the .Rd files, but I don't think that does any harm.

@teunbrand teunbrand added this to the ggplot2 4.0.0 milestone May 6, 2025
Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Merge branch 'main' into aesthetics_roxy_tag

# Conflicts:
#	R/geom-hex.R
#	R/geom-path.R
#	R/geom-polygon.R
#	R/geom-ribbon.R
#	R/geom-rug.R
#	R/stat-connect.R
#	R/stat-contour.R
@teunbrand teunbrand merged commit 9383d2a into tidyverse:main May 19, 2025
13 checks passed
@teunbrand teunbrand deleted the aesthetics_roxy_tag branch May 19, 2025 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: expose aesthetic section helper
2 participants