Skip to content
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

use a ggplot_add method to simplify ord_aes usage #68

Open
corybrunson opened this issue Dec 26, 2024 · 0 comments
Open

use a ggplot_add method to simplify ord_aes usage #68

corybrunson opened this issue Dec 26, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@corybrunson
Copy link
Owner

Currently, ggplot_add.LayerRef() enables mapping aesthetics for a reference data set (separate from the inherited data) by storing the aesthetic mapping as a parameter. It is used by two referential stats, StatProjection and StatRule, which process the reference data using StatReferent$setup_params(). This behavior could be spun off to {gggda}. The biplot ggprotos Stat*Projection and Stat*Rule, however, use setup_reference_params(), which handles 'tbl_ord'-specific syntax before passing on to StatReferent$setup_params().

It might be possible for a universal LayerOrd class to additionally obtain the complete set of artificial coordinates from the fortified ordination model (via recover_coord.data.frame()), obviating the need for ord_aes()'s first argument to be the model itself. This class could be automatically built in to all of the (stat|geom)_(rows|cols)_*() shortcuts, resolving the problem of stat_*() rather than geom_*() or even layer() needing to be used, which fails to add the LayerRef class and hopefully triggers this error.

@corybrunson corybrunson added the enhancement New feature or request label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant