Skip to content

plot(my.procrustes.model) from library {vegan}

2 messages · Gavin Simpson, Federico Calboli

#
Federico Calboli wrote:
<SNIP>

The object returned by procrustes() contains Yrot and X, the rotated 
matrix and the target matrix respectively. You could plot both of these 
using standard plotting tools. You'll need to make the axes have the 
same scale.

plot(mod.pro$Yrot, asp = 1)
points(mod.pro$X, col = "red", pch = 16)

Which seems to get you a similar plot to the one plot(mod.pro) produces.
HTH

Gavin
#
Dear All,

I would like to ask how to customize the graph corresponding to a
procrustes analysis.

I have to distance matrices, that I transform to two set of coordinates
by means of muti dimensional scaling:

library(mva)

c1<-cmdscale(mat.dist1)
c2<-cmdscale(mat.dist2) 

I vant to rotate c2 on c1, and I use the "procrustes" analysis from the
{vegan} library.

library(vegan)

mod.pro<-procrustes(c1,c2)

plot(mod.pro)

My problem is that I need to change the graphical output of
plot(mod.pro). The standard output gives empty circles for the rotated
c2 matrix and arrows pointing to the target c1 matrix. 

I would like to have two set of symbols, one for c1 and the other for
c2, with a line connecting the corresponding points or at worst I would
like to have circles for the point of the target matix and the arrows
pointing to the rotated matrix.

I tried some manipulations based on the standard "plot" function, but I
was quite unsucessful. Can anyone give advice? I am happy to give a toy
example if needed.

Regards,

Federico Calboli