Plotting PCA in 3d

Issue #903 new
Former user created an issue

Dear members of the Grant Lab,

I'd like to know if it's possible to plot the PCA in 3D, I'd like to be able to observe PCs 1, 2, and 3 in the same graph.

Thank you very much for your attention.

Best, Fernando

Comments (1)

  1. Xinqiu Yao

    In principle yes. It is basically a scatter plot, and you can use, for example, the rgl package to make it 3D.

    library(rgl)
    plot3d(pc$z[, 1], pc$z[, 2], pc$z[, 3])
    

  2. Log in to comment