View source: R/dimension_reduction.R
plot_pcs | R Documentation |
All the various dimension reduction methods share some of their end-results in common. Most notably a table of putative components which may be plotted against one another so that one may stare at the screen and look for clustering among the samples/genes/whatever. This function attempts to make that process as simple and pretty as possible.
plot_pcs(
pca_data,
first = "PC1",
second = "PC2",
variances = NULL,
design = NULL,
plot_title = TRUE,
plot_labels = NULL,
x_label = NULL,
y_label = NULL,
plot_size = 5,
outlines = TRUE,
plot_alpha = NULL,
size_column = NULL,
rug = TRUE,
max_overlaps = 20,
cis = c(0.95, 0.9),
ellipse_type = "t",
ellipse_geom = "polygon",
label_size = 4,
...
)
pca_data |
Dataframe of principle components PC1 .. PCN with any other arbitrary information. |
first |
Principle component PCx to put on the x axis. |
second |
Principle component PCy to put on the y axis. |
variances |
List of the percent variance explained by each component. |
design |
Experimental design with condition batch factors. |
plot_title |
Title for the plot. |
plot_labels |
Parameter for the labels on the plot. |
x_label |
Label for the x-axis. |
y_label |
Label for the y-axis. |
plot_size |
Size of the dots on the plot |
outlines |
Add a black outline to the plotted shapes? |
plot_alpha |
Add an alpha channel to the dots? |
size_column |
Experimental factor to use for sizing the glyphs |
rug |
Include the rugs on the sides of the plot? |
max_overlaps |
Increase overlapping label tolerance. |
cis |
What (if any) confidence intervals to include. |
ellipse_type |
Choose the kernel for the ellipse. |
ellipse_geom |
Use this ggplot geometry. |
label_size |
The text size of the labels. |
... |
Extra arguments dropped into arglist |
gplot2 PCA plot
[directlabels] [ggplot2] [plot_pca] [pca_information]
## Not run:
pca_plot = plot_pcs(pca_data, first = "PC2", second = "PC4", design = expt$design)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.