Skip to content

use a ggplot_add method to simplify ord_aes usage #9

@corybrunson

Description

@corybrunson

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions