[R-sig-eco] Graphical parameters in metaMDS

Jari Oksanen jari.oksanen at oulu.fi
Sat May 22 00:37:44 CEST 2010


On 21/05/10 20:49 PM, "Gian Maria Niccolò Benucci" <gian.benucci at gmail.com>
wrote:

> Hi all,
> 
> I would ask about graphical parameters in metaMDS plots. I have this code:
> 
>> metaMDS(data.ectomyco, distance="bray", k=2, trymax=100, autotransform=F)
> -> NMS.2
>> plot(NMS.2, type="n")
>> ordisymbol(NMS.2, env.table, "Host", legend=T)
> 
> My question is:
> How could I enlarge the points symbols of the sites? is there a functions as
> "pch=0.7" that I can use as when I plot points symbols in other other graphs
> (i.g. rankabundance curves). I need to plot different symbols for different
> "Host" I have in the environmental table and these symbols are too small to
> fit in the paper column.
> Any help will be surely appreciated, many thank you in advance...
>
Gian,

I know the function metaMDS (because I wrote it), but I have no idea about
ordisymbols -- except that I've been thinking to write a function with that
name. I know is that you can use vegan function points() for the task. the
points() function accepts all usual graphical arguments, including pch, cex,
col etc. However, it doesn't have legend argument,  but you msut supply it
separately. Neither does it know 'env.table'. Looking at your code above, I
guess (but this is guessing: I don't know ordisymbols) the same effect can
be reached with

plot(NMS.2, type = "n")
with(env.table, points(NMS.2, pch=as.numeric(Host)) ## add pch, col etc...
with(env.table, legend("topleft", leg=levels(Host),
pch=seq_along(length(Host)))

Of course, all of this is completely untested.

Cheers, Jari Oksanen

PS. When you ask for the advice on non-standard commands defined only in
packages, you should tell us what are the packages involved. In this case,
metaMDS and ordisymbol are in different packages so that you need extra care
in their interface, and you should also express this in your query.



More information about the R-sig-ecology mailing list