View source: R/plot_pca_projection_and_save.R
plot_pca_projection_and_save | R Documentation |
Plot PCA projection with save option
plot_pca_projection_and_save(scores.file, info.name, info.type,
PCx = "PC1", PCy = "PC2", factor.levels = levels(info.type),
aes_fill = NULL, savename, savePlot = F, width = 3, height = 2,
title = "", label = F, savetype = ".pdf", w = 6, h = 3,
aspect.ratio = 0.8, legend = F, legendname = "default",
colors = colpalette[1:4], psize = 2.5, plotLabelname = "none")
scores.file |
PCA score file (scores file, output of PCA_from_file) |
info.name |
vector of sample names |
info.type |
vector of sample types in same order as names |
PCx , PCy |
PCs to display |
factor.levels |
ie. levels <- c("Undifferentiated", "Neural crest-like", "Transitory", "Melanocytic")) |
aes_fill |
column header to color samples by |
savename |
prefix to save file by |
savePlot |
default=F |
width , height |
size of the plot |
title |
title of the plot |
label |
column name to label samples by on PCA plot, default = F |
savetype |
".pdf" or ".png" or ".tiff", etc. |
colors |
ie. colpalette <- c("Cluster 1"="#4F81BD","Cluster 2"="#C0504D","Cluster 3"="#8064A2","Cluster 4"="#9BBB59") |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.