For gt_pca, the following types of plots are available:

  • screeplot: a plot of the eigenvalues of the principal components (currently it plots the singular value)

  • scores a scatterplot of the scores of each individual on two principal components (defined by pc)

  • loadings a plot of loadings of all loci for a given component (chosen with pc)

# S3 method for class 'gt_pca'
autoplot(object, type = c("screeplot", "scores", "loadings"), k = NULL, ...)

Arguments

object

an object of class gt_pca

type

the type of plot (one of "screeplot", "scores" and "loadings")

k

the principal components to be plotted: for scores, a pair of values e.g. c(1,2); for loadings either one or more values.

...

not currently used.

Value

a ggplot2 object

Details

autoplot produces simple plots to quickly inspect an object. They are not customisable; we recommend that you use ggplot2 to produce publication ready plots.