MathGroup Archive 2013

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

Search the Archive

Re: labeling clustered data

  • To: mathgroup at smc.vnet.net
  • Subject: [mg131273] Re: labeling clustered data
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Sun, 23 Jun 2013 22:54:58 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <20130623004608.B6FC269BF@smc.vnet.net>

data = RandomReal[{}, {10, 2}];



Module[{n = 1},
 ListPlot[data,
  Epilog -> {
    Text[n++, #, {-1, -1}] & /@
     data},
  PlotRange ->
   {{-0.1, 1.1}, {-0.1, 1.1}},
  Frame -> True, Axes -> False]]



Module[{n = 1},
 ListPlot[FindClusters[data, 2],
  Epilog -> {
    Text[n++, #, {-1.5, -1.5}] & /@
     data},
  PlotMarkers -> Automatic,
  PlotRange ->
   {{-0.1, 1.1}, {-0.1, 1.1}},
  Frame -> True, Axes -> False]]



Bob Hanlon




On Sat, Jun 22, 2013 at 8:46 PM, <ahmedco31 at hotmail.com> wrote:

> Hi, I have a list of 2D points like this {{a,b},{x,y},...}, and I don't
> know how to plot them with labeled dots such that the first point labeled
> with number 1 and the second point labeled with 2, ...etc. Then I use the
> clustering function "FindClusters" to cluster the points into 2 groups, how
> can I plot the resulted list of two groups of points such that I keep the
> same labeling order?
>
> Thanks in advance
>
>




  • Prev by Date: Re: How to remove the "0." from "0. + 1.41774i"
  • Next by Date: Re: Automatic Mathematica Updates?
  • Previous by thread: labeling clustered data
  • Next by thread: vertices of a rectangle