PlotPCA3DScoreImg | R Documentation |
This function creates both a static 3D PCA score plot as well as an interactive 3D PCA score plot using the plotly R package. The 3D PCA score plot is stored in the mSetObj (mSetObj$imgSet$pca.3d). To view the plot, if your mSetObj is named mSet, type "mSet$imgSet$pca.3d" inro your R console, and the 3D plot will appear.
PlotPCA3DScoreImg(mSetObj=NA, imgName,
format="png", dpi=72, width=NA, inx1, inx2, inx3, angl)
mSetObj |
Input name of the created mSet Object. |
imgName |
Input a name for the plot. |
format |
Select the image format, "png", or "pdf". |
dpi |
Input the dpi. If the image format is "pdf", users need not define the dpi. For "png" images, the default dpi is 72. It is suggested that for high-resolution images, select a dpi of 300. |
width |
Input the width, there are 2 default widths, the first, width = NULL, is 10.5. The second default is width = 0, where the width is 7.2. Otherwise users can input their own width. |
inx1 |
Numeric, indicate the number of the principal component for the x-axis of the loading plot. |
inx2 |
Numeric, indicate the number of the principal component for the y-axis of the loading plot. |
inx3 |
Numeric, indicate the number of the principal component for the z-axis of the loading plot. |
angl |
Input the angle |
Jeff Xiajeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.