Thanks a lot for this  really time saving method compared to mine.

Greetings

Birgit

Am 20.07.2007 um 11:53 schrieb Duncan Murdoch:

> On 20/07/2007 5:23 AM, Birgit Lemcke wrote:
>> Hello Jim,
>> thanks for your answer but  I still have problems with the  
>> labels.  Perhaps you can help me a second time.
>> I have the output of cmdscale and it looks like this:
>>                        [,1]          [,2]          [,3]
>> Anth_cap      -0.011833788 -0.1091355289 -0.0222467839
>> Anth_crin     -0.008178993 -0.0219545815 -0.0076695878
>> Anth_eck       0.026900827 -0.0422055677 -0.1340542844
>> Anth_gram     -0.010860990  0.0080112322  0.0201743866.........
>> In the next step I created 3 vectors out of the three columns
>> PCoA1<-PCoA[,1]
>> PCoA2<-PCoA[,2]
>> PCoA3<-PCoA[,3]
>> After that I plotted the 3 vectors
>> plot3d(PCoA1,PCoA2,PCoA3, type="p", col=rainbow(1000),size=5)
>
> There's no need to extract the 3 columns:  you could just use
>
> plot3d(PCoA, type="p", col=rainbow(1000),size=5)
>
> with the data above.
>> and now I try to handle this text3d function and label the points  
>> in  the graphic with the names in the first column. But I am a  
>> beginner  and don´t know the syntax for this in the text3d.
>> I tried to make vectors out of every row like this:
>> Anth_cap<- PCoA[1,]
>>  > Anth_crin<- PCoA[2,]
>>  > Anth_eck<- PCoA[3,]
>>  > Anth_gram<- PCoA[4,]
>>  > Anth_insi<- PCoA[5,]
>>  > Anth_laxi<- PCoA[6,].........
>> and than tried to implement this in the text3d:
>> text3d( c(Anth_cap,
>> Anth_crin,
>
> I think all you need is
>
> text3d(PCoA, text=Nam)
>
> but you might want to set the adj argument if you want the labels  
> offset from the points, and you might want type="n" in the original  
> plot3d call if you don't want the points to interfere with the labels.
>
> Duncan Murdoch

Birgit Lemcke
Institut für Systematische Botanik
Zollikerstrasse 107
CH-8008 Zürich
Switzerland
Ph: +41 (0)44 634 8351
[EMAIL PROTECTED]






        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to