[R] Symbols on a capscale object plot
Rodrigo Aluizio
r.aluizio at gmail.com
Sat Sep 13 13:20:51 CEST 2008
Hi, I'm a beginner with R, but I'm getting excellent results with it.
Well I've got an capscale object (vegan package) and I want to made a biplot
with symbols representing six groups of areas.
With the plot.cca function and some par attributes (like 'labels') I was
able to substitute the samples names for keyboard symbols ('x','o','#',ect),
but it's far from the ideal.
I've already search about it and find something using 'Hershey' fonts
symbols for a scatterplot, but it didn't work for the biplot (capscale
object).
I would like to use something like squares, triangles and circles (filled
and empty).
Does anyone have and idea to solve it?
Thank you for your attention and patience
Sorry if the English is not that good, I'm Brazilian.
Here is the script I'm using!
# The analysis
library(vegan)
library(xlsReadWrite)
PotiAbio<-read.xls('PotiAbioCanoco.xls',sheet=1,rowNames=T)
PotiBio<-read.xls('FatorialReplica.xls',sheet=8,rowNames=T)
attach(PotiAbio)
LogPotiBio<-log(PotiBio+1)
dbRDA<-capscale(t(LogPotiBio)~"Environmental Variables",dist="bray",add=T)
dbRDA
#Preparing to generate and save the graphic
SymbolsRep<-read.xls('Fatores.xls',sheet=2)
tiff('dbRDAPontos.tif',width=1250,height=1250,res=150)
plot.cca(dbRDA,type='none',display=c('bp','sites'))
text.cca(dbRDA,dis='cn',col=323232,cex=0.7,lwd=2,lty='dotted')
text.cca(dbRDA,dis='sites',col='black',cex=0.8,labels=FatoresSymbols$RepSimb)
dev.off()
___________________________________
MSc. Rodrigo Aluizio
Centro de Estudos do Mar/UFPR
Laboratório de Micropaleontologia
Avenida Beira Mar s/n - CEP 83255-000
Pontal do Paraná - PR - BRASIL
Fone: (0**41) 3455-1496 ramal 217
Fax: (0**41) 3455-1105
More information about the R-help
mailing list