Re: [R] change individual label colours in a cluster plot?

2009-03-04 Thread Sur Nathan

Hi Jim,

  How are you?  I saw your posting. I am trying to do clustering for co
authorship.What I have is undirected graph .I want to have clusters for 393
nodes.

I am attaching the file along with this mail.If you move to the section
Cluster I am looking to do something like that.Is it something you are
familiar with.

Can you tell me how you did it in R. 

Nathan


Jim Ottaway wrote:
 
 patricia garcía gonzález kurtney...@hotmail.com writes:
 
 Hi,
 
 If you have a variable, that defines what you want to differentiate
 (sociology, economics etc.) then you can add color depending on the
 value of that variable. You will have to convert it to numeric if it is
 not. An example would be
 
 plot( iris[ , 1 ], iris[ , 2], col = iris[ , 3 ] )
 
 
 Thank you.  I'm not sure that I can do that with an hclust object,
 though: perhaps something using the text function and the order data in
 the hclust object might work?
 
 Currently, I'm good getting results using a script to edit the
 postscript output, but I'm keen to find an R solution, if only to
 improve my understanding of R graphicss.
 
 Yours sincerely,
 -- 
 Jim Ottaway
 
 __
 R-help@r-project.org 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.
 
 
http://www.nabble.com/file/p22336078/Clustering%2BTechnique.pdf
Clustering+Technique.pdf 
-- 
View this message in context: 
http://www.nabble.com/change-individual-label-colours-in-a-cluster-plot--tp21852671p22336078.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org 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.


Re: [R] change individual label colours in a cluster plot?

2009-02-05 Thread patricia garcía gonzález

Hi, 

If you have a variable, that defines what you want to differentiate (sociology, 
economics etc.) then you can add color depending on the value of that  
variable. You will have to convert it to numeric if it is not.
An example would be

plot( iris[ , 1 ], iris[ , 2], col = iris[ , 3 ] )


Regards


Patricia

 To: r-h...@stat.math.ethz.ch
 From: j.otta...@lse.ac.uk
 Date: Thu, 5 Feb 2009 13:44:21 +
 Subject: [R] change individual label colours in a cluster plot?
 
 I am doing some bibliometric analysis of interdisciplinarity using
 cluster analysis of co-authorship.
 
 I'd like to be able to specify the colour of individual authors in the
 labels to show a prior grouping by discipline (red for sociology
 authors, blue for economics authors, ..., that sort of thing).
 
 Is there any way of doing this sort of thing? I'm hoping for something like:
 
 h - hclust(authors.dist)
 
 h$labels - colorlabels(c(red, blue,..., green))
 
 plot(h)
 
 __
 R-help@r-project.org 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.

_


[[alternative HTML version deleted]]

__
R-help@r-project.org 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.


Re: [R] change individual label colours in a cluster plot?

2009-02-05 Thread Jim Ottaway
 patricia garcía gonzález kurtney...@hotmail.com writes:

 Hi,

 If you have a variable, that defines what you want to differentiate
 (sociology, economics etc.) then you can add color depending on the
 value of that variable. You will have to convert it to numeric if it is
 not. An example would be

 plot( iris[ , 1 ], iris[ , 2], col = iris[ , 3 ] )


Thank you.  I'm not sure that I can do that with an hclust object,
though: perhaps something using the text function and the order data in
the hclust object might work?

Currently, I'm good getting results using a script to edit the
postscript output, but I'm keen to find an R solution, if only to
improve my understanding of R graphicss.

Yours sincerely,
-- 
Jim Ottaway

__
R-help@r-project.org 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.