MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

graph plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88487] graph plot
  • From: N K <nk200810 at yahoo.com>
  • Date: Tue, 6 May 2008 06:43:29 -0400 (EDT)

Hi everyone, I have the following scenario:

lst = {12, 14, 12, 13, 15, 16, 16, 12, 5, 13}
clusterNumber = 3;
newlst = FindClusters[lst, clusterNumber] 
The above gives me: {{12, 12, 12, 5}, {14, 13, 13},
{15, 16, 16}}

I now want to plot the 3 clusters. I tried the
following: 
GraphPlot[Flatten[Thread[# -> (List @@ #)] & /@
newlst],  SelfLoopStyle -> None, VertexLabeling ->
True]

However, there are couple of issues with the above
that I could not figure out:
1) Not all nodes are shown. For instance 12 is shown
only once in the output. Whereas I would like to see
all 3 instances of 12.

2) I would like the above to look like the following
(this is sort of the representation I want): 
          13 &#8232;          
         13  14&#8232;                          
                                 16&#8232;            
             
                                 16 &#8232;  15       
        12  12&#8232;                                 
                                                      
                                                      
                                                      
                                             
                                                      
       12    &#8232;                                  
                                                      
      
                                                      
                                       5

&#8232;16 is the maximum value in my lst and that is
why it is in the center. The values in the cluster of
16 {16,16,15} are in the center. 
15 is a little further away because of the distance of
1. 
The cluster of {13,13,14} appears to be closer than
the {12,12,12,5} because the sum of 13+13+14 = 40 and
12+12+12+5=41. 

Thanks very much in advance

&#8232;


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



  • Prev by Date: Re: Re: Getting the size of the bounding box of a Graphics3D[]
  • Next by Date: Re: Hash Table for self avoiding random walks
  • Previous by thread: Re: Request for Collective Wisdom...
  • Next by thread: Matrix of big dimensions