plotIndiv function - explained variance of PC in plot

Issue #152 resolved
Emeline F (Aestra) created an issue

Hello,

I noticed one problem about graphical output of plotIndiv function. If i use the default style (ggplot2), the xlab and ylab are just "x" and "y".ggplot2.png

If i use other graphics styles (such as lattice), the xlab and ylab are the explained variance of PC. lattice.png

Thank you !

Comments (8)

  1. michael eisenring

    Dear Florian, Thank you for this. The problem that Emeline mentioned is solved. However, since I updated to the new version I am not able to change the size of the Y- and X-axes labels, using the "size.xlable" command. Is this possible?

    Thank you, Mike

  2. Florian Rohart

    Hi Michael,

    I can't replicate your problem, it's working on my end with the latest version

    data(multidrug)
    pca.res <- pca(multidrug$ABC.trans, ncomp = 4)
    
    plotIndiv(pca.res, ind.names = multidrug$cell.line$Class,
    group = as.numeric(as.factor(multidrug$cell.line$Class)),
    size.xlabel=rel(3), size.ylabel = rel(6))
    

    Screen Shot 2019-01-10 at 11.17.05 am.png

  3. michael eisenring

    This is strange, and I am pretty sure it is a stupid mistake from my side. I use the fix that you recommended earlier on in this post and I also use the newest version of R (3.5.2).

    In my example I use a very large value for "size.ylable" and a small value for "size.xlable" but as you can see the axes lables have still the same size.

    par(cex.lab=15,cex.axis=1.2)
    plotIndiv(dta.plsda3, ind.names = F, ellipse = T, legend =TRUE,centroid=F,star=F,
              title="Canopy-overall",style="ggplot2", col=c("#a1d99b","#41ab5d","#005a32"),
              cex = 5,size.xlable=1,size.ylable=26,pch=16,rep.space = 'X-variate',size.legend=12)
    

    Unbenannt.PNG

  4. Florian Rohart

    Hi Michael,

    I think your misspelling the parameters! “size.xlabel” and not “size.xlable” :)

  5. Log in to comment