plot_mds_pca_2d | R Documentation |
Plots two specified components estimated with the function
calculate_mds_pca
. Color and shape of each sample can be set
based on different variables.
plot_mds_pca_2d(
res,
dim = c(1, 2),
se,
var.color = NULL,
palette = NULL,
var.shape = NULL,
shape.values = NULL,
title = NULL,
factor = 5,
ellipse = FALSE,
ellipse.type = "convex"
)
res |
List. Output of |
dim |
Numeric vector (2). Numbers of components to be plotted. |
se |
|
var.color |
Character. Name of variable used to determine color. If NULL black color will be used for all samples. |
palette |
Color palette to be used (default palette used in
|
var.shape |
Character. Name of variable used to determine shape. If NULL filled circles will be used for all samples. |
shape.values |
Vector with symbols. Needs to provide a symbol for each unique value of var.shape. |
title |
Character. Main title of plot. |
factor |
Numeric. Parameter of the function
|
ellipse |
Logical. Should ellipses around points be drawn? (default: FALSE). |
ellipse.type |
Character. Type of ellipse as given in
|
List with the following components:
info: data.frame with information about outlier samples or NULL
plot: Scatterplot as returned by ggscatter
data("se.gene")
## PCA
res.pca = calculate_mds_pca(se = se.gene,
method = "pca")
## color code by group
plot_mds_pca_2d(res = res.pca,
dim = c(1, 2),
se = se.gene,
var.color = "group")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.