Skip to contents

Primarily intended for package developers, this function factory is used to create layer functions in the ggformula package.

Usage

interactive_layer_factory(geom_fun)

Arguments

geom_fun

A character string naming an interactive geom (example: "geom_point_interactive")

Details

Given "geom_point_interactive", this looks up the corresponding non-interactive function (gf_point()) and reads its ggformula_spec() to determine the geom, stat, position, aes_form, extras, aesthetics, inherit.aes, and check.aes to reuse when building the interactive counterpart, rather than introspecting gf_point()'s internals directly. This makes it robust to gf_* functions built by other packages, as long as they were created with layer_factory() (and therefore have a spec to read).