PLS-DA plotting individuals

Hi there,

I’m wondering if its possible to visualize multiple components in 3D with PLS-DA. I see that this is possible with other methods in the mixomics package (such as rCCA). Is it possible to make a 3D plot or just a way to plot PC1 vs PC3 for the PLS-DA method?


Hi @Andy,

It is in fact possible to customise the components plotted in 2D or plot in 3D. See example below.

# splsda model
X <- breast.tumors$gene.exp
Y <- as.factor(breast.tumors$sample$treatment)
res <- splsda(X, Y, ncomp = 3, keepX = c(25, 25, 25))
# plot components 1 and 3
plotIndiv(res, comp = c(1,3))
# plot 3D
plotIndiv(res, comp = c(1, 2, 3), style = '3d')

Hope it ehlps,


1 Like