Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: labeling clustered data
Replies: 3   Last Post: Jun 25, 2013 2:51 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 891
Registered: 10/29/11
Re: labeling clustered data
Posted: Jun 23, 2013 10:48 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


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@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
>
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.