plotScoresRGL: Interactive 3D Score Plot of a Spectra Object
Description
This function uses the rgl package to create an interactive plot of PCA scores derived from a "Spectra" object. A title and legend can be added if desired. Classical or robust confidence ellipses may be added if desired.
If you intend to make a hard copy of your plot, use lab.opts = TRUE until you have found a good view of your data. Then note corners of the cube where the title and legend won't interfere with viewing the data, and use these as arguments for t.pos and leg.pos, and add title. Adjust as necessary, then turn off label display using lab.opts = FALSE. Back at the console, use > rgl.snapshot("file_name.png") to create the hardcopy.