[adegenet-forum] s.class: how to avoid box around plotting area

Walter Durka walter.durka at ufz.de
Fri Oct 27 11:10:35 CEST 2017


Hi,

I use the standard plot command to display results of PCoA and s.class 
to add the stars and elypses; and I combine two plots for axes 1+2 and 
1+3. However, s.class adds a box around the full plotting area, which  
looks nasty, in particular as I combined two plots (see file attached).

How can I avoid that s.class adds these boxes?

regards

Walter

#######################################

pco1<-dudi.pco(d.dist,scannf=F,nf=6)

  par(mfrow=c(2,1), mar=c(2,4,2,2)+0.1,mgp=c(3,1,0))
  par( mar=c(.5,4,2,2)+0.1)

   ## basic plot
  plot(pco1$tab[,1:2], col=myCol, cex=2, pch=myPch, xaxt='n',yaxt='n',
       xlab=paste("PCoA1 
(",format(PCO1_exV,digits=2),"%)",sep=""),ylab=paste("PCoA2 
(",format(PCO2_exV,digits=2),"%)",sep=""),
       mgp=c(1,.5,0))
  mtext("A",3,at=min(pco1$tab[,1]) - 
(max(pco1$tab[,1])-min(pco1$tab[,1]))/9,cex=1.5,font=2)
  # groups
  s.class(pco1$tab[,1:3],xax=1,yax=2,fac =d.pop$pop,addaxes=T,col=popc,
          cpoint=0.5, grid=F, cstar=1,axesell=F, 
sub="",possub="topleft",add.plot=T)

  par( mar=c(2,4,.5,2)+0.1)
  plot(pco1$tab[,3]~pco1$tab[,1], col=myCol, cex=2, pch=myPch, 
xaxt='n',yaxt='n',
       xlab=paste("PCoA1 
(",format(PCO1_exV,digits=2),"%)",sep=""),ylab=paste("PCoA2 
(",format(PCO2_exV,digits=2),"%)",sep=""),
       mgp=c(1,.5,0))
  mtext("B",3,at=min(pco1$tab[,1]) - 
(max(pco1$tab[,1])-min(pco1$tab[,1]))/9,cex=1.5,font=2)
  #  groups
  s.class(pco1$tab[,1:3],xax=1,yax=3,fac 
=d.pop$pop,addaxes=T,col=popc,#funky(9),
          cpoint=0.5, grid=F, cstar=1,axesell=F, 
sub="",possub="topleft",add.plot=T)
   ####################################################



-- 

*****
Dr. Walter Durka
Department Biozönoseforschung
Department of community ecology

Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research - UFZ
Theodor-Lieser-Str. 4 / 06120 Halle / Germany

walter.durka at ufz.de / http://www.ufz.de/index.php?en=798
phone +49 345 558 5314 / Fax +49 345 558 5329

--------------------------------------------------------------------------------------------

Sitz der Gesellschaft: Leipzig
Registergericht: Amtsgericht Leipzig
Handelsregister Nr. B 4703
Vorsitzender des Aufsichtsrats: MinDirig Wilfried Kraus
Wissenschaftlicher Geschäftsführer: Prof. Dr. Georg Teutsch
(Scientific Managing Director)
Administrative Geschäftsführerin: Dr. Heike Graßmann
(Administratve Managing Director)
				
--------------------------------------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Rplot1.pdf
Type: application/pdf
Size: 45465 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20171027/43e0cc37/attachment-0001.pdf>


More information about the adegenet-forum mailing list