plot_pca | R Documentation |
Plots PCA with ggplot2
plot_pca( data_, x = "PC1", y = "PC2", include.variance = T, include.ellipses = F, color.by, color, fill.by, fill, shape.by, shape, size.by, size, point.transparency = 1, ellipse.size = 1, ellipse.transparency = 1, ellipse.linetype = 1, custom.theme = theme_thesis_framed_no_axis, aspect.ratio = 1, plot.center, axis.unit.ratio, expand.x.axis = c(0, 0), expand.y.axis = c(0, 0), x.axis.breaks = 1, y.axis.breaks = 1, legend.title.color, legend.title.shape, legend.title.fill, legend.title.size, legend.position = "right", legend.rows, view = T, input = "data_pca", output = "plot_pca" )
data_ |
data_ |
x |
Principal component to plot on x-axis |
y |
Principal component to plot on y-axis |
include.variance |
add variance to axis titles |
include.ellipses |
add ellipses around data points |
color.by |
column to use for coloring data points |
color |
color |
fill.by |
column to use for filling data points |
fill |
fill (same as color if not defined) |
shape.by |
column to use for shape of data points |
shape |
shape |
size.by |
column to use for size of data points |
size |
point size (default = 1) |
point.transparency |
transparency (0-1) |
ellipse.size |
thiccness of ellipse lines (default = 1) |
ellipse.transparency |
transparency of ellipse lines (default = 1) |
ellipse.linetype |
linetype of ellipses (default = 1) |
custom.theme |
theme to use for plot |
aspect.ratio |
absolute length of x-axis/y-axis |
plot.center |
vector for center of plot |
axis.unit.ratio |
ratio between x- and y-axis units |
expand.x.axis |
expand x.axis (see scale_x_continuous) |
expand.y.axis |
expand x.axis (see scale_y_continuous) |
x.axis.breaks |
space between x-axis breaks |
y.axis.breaks |
space between y-axis breaks |
legend.title.color |
title of color legend |
legend.title.shape |
title of shape legend |
legend.title.fill |
title of fill legend |
legend.title.size |
title of size legend |
legend.position |
position of legend |
legend.rows |
(optional) number of rows legend content should be presented in |
view |
view plot |
input |
name of input data |
output |
name of output data |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.