mm_VizShapespace: Visualize PC axes

View source: R/explore.R

mm_VizShapespaceR Documentation

Visualize PC axes

Description

Plot a scatterplot and vizualize shape change across the X axis.

Usage

mm_VizShapespace(
  mmPCA,
  xPC = 1,
  yPC = 2,
  yr = c(0, 1.1),
  cols = NULL,
  title = "",
  png_dir = NULL
)

Arguments

mmPCA

Output of mm_CalcShapespace, containing a PCA object with PC shapes

xPC

The PC to be plotted on the x axis. If yPC is left null, a univariate density distribution will be plotted with min/max shapes.

yPC

The PC to be plotted on the y axis.

yr

The y-xis range, in the format c(0,1)

cols

A vector of colors of length n, for use in scatterplot.

title

To be used for the plot

png_dir

A file path to a directory in which to save out PNG figures. Names will be automatically assigned based on input PC(s).

Details

Meant to be a quick diagnostic plot with minimal customization.

Value

Produces a series of plots to visualize PCA analysis. If png_dir is specified, function will save out .png files. Otherwise plots will be displayed in the default plot window.


ehrlichd/moRphomenses documentation built on Dec. 13, 2024, 8:36 a.m.