Learn R Programming

geomorph (version 4.0.8)

make_ggplot: Convert geomorph plots to ggplot objects

Description

Function attempts to coerce plot information from a geomorph plot object to an amenable ggplot object.

Usage

make_ggplot(object)

Arguments

object

A plot object produced from plot.gm.prcomp, plot.pls,plot.procD.lm, or plotAllometry. For plot.procD.lm objects, only types "PC" or "regression" should work.

Author

Michael Collyer

Details

This function will attempt to use the plot arguments from an geomorph plot object to make a ggplot that can be additionally updated, as desired. Not all plot characteristics might be converted. Nonetheless, a ggplot will be coerced and could be updated, according to user preference.

This function assumes no responsibility for arguments made by ggplot. It merely produces a ggplot object that should resemble a geomorph plot default. Any augmentation of ggplot objects can be done either by direct intervention of the ggplot produced or reformatting the initial geomorph plot produced. One should not expect direct correspondence between R base plot parameters and ggplot parameters.