[R-sig-eco] Graphical parameters in metaMDS

Jari Oksanen jari.oksanen at oulu.fi
Sat May 22 19:20:31 CEST 2010


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

> Jari,
> 
> Sorry, in the future I will spcify the pakages where the functions are and
> then I'll post the query.
> 
> Anyway, I tried your code, as you suggested:
> 
>> plot(NMS.2.new, type = "n")
>> with(env.table, points(NMS.2.new, pch=as.numeric(Host)), pch=1.5,
> col=blue)
>> with(env.table, legend("topleft",
> leg=levels(Host),pch=seq_along(length(Host))))
> 
> But:
> - the "pch" and the "col" commands do not make any dimensional change of
> points on the graph (I treid using different pch values)
> - the legent is print in the left top but the symbols are the same for the
> two host I have in the env.table, (two open circles) instead of the open
> circles and the open triangles I had into the graph.
> 
> I'll try to study better the functions you suggested me and I will post the
> new code if I find a solution that works well.
> Thank you very very much,
> 
> 
Gian,

'pch' and 'col' do not change the sizes of the plotting character, but 'cex'
does. Study the documentation of the appropriate functions ('points') to see
what you can do.

If you do not tell us what you want to do it is very difficult to tell you
how to do it. I didn't know you wanted to change the sizes of the
characters. 

The code was untested. Perhaps I should have written legend(..., pch =
seq_along(length(levels(Host)))), but I don't care to try to see if that
works (perhaps you can try?).

Cheers, jari oksanen



More information about the R-sig-ecology mailing list