Skip to content
Prev 9205 / 29559 Next

scatter.enfa tip (adehabitat)

Dear Consuelo,

If the labels overlap a lot, you won't manage to do anything with it 
from R. You can play, as you tried, with the different parameters, or 
even build your plot step by step, but my best advice would be to use 
the package Cairo, and especially CairoSVG, to export it to svg, and 
then edit from Inkscape.

 From the example of scatter.enfa :

library(Cairo)
data(lynxjura)

map <- lynxjura$map

## We keep only "wild" indices.
tmp <- lynxjura$locs[,4]!="D"
locs <- lynxjura$locs[tmp, c("X","Y")]

## We perform a square root transformation
## of the variable to normalize it
map[,4] <- sqrt(map[,4])

## We perform the ENFA
tmp <- data2enfa(map, locs[tmp, c("X","Y")])
(enfa1 <- enfa(dudi.pca(tmp$tab, scannf=FALSE),
                tmp$pr, scannf = FALSE))
CairoSVG()
scatter(enfa1)
dev.off()

And then check for the svg file in your working directory.

Hope this helps,
Mathieu.


Le 02/09/2010 19:12, Consuelo Hermosilla a ?crit :