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 points in ListPlot
Replies: 4   Last Post: Sep 8, 2005 5:10 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: 2,604
Registered: 1/29/05
Re: Labeling points in ListPlot
Posted: Sep 5, 2005 2:29 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Needs["Graphics`"];

data=Table[Random[],{10},{2}];
labels=Table["p"<>ToString[n],{n,Length[data]}];

ListPlot[data,Frame->True,Axes->False,
PlotStyle->{Red,AbsolutePointSize[4]},
Epilog->(Text[StyleForm[#[[1]],
FontFamily->"Times New Roman",
FontSize->12],
#[[2]],{1.25,1.25}]&/@Thread[{labels,data}]),
PlotRange->{{-.1,1.1},{-.1,1.1}}];

Show[Graphics[{(Text[StyleForm[#[[1]],
FontFamily->"Times New Roman",
FontSize->12],
#[[2]],{1.25,1.25}]&/@Thread[{labels,data}]),
Red,AbsolutePointSize[4],Point/@data}],
Frame->True,
PlotRange->{{-.1,1.1},{-.1,1.1}}];


Bob Hanlon

>
> From: Steve Gray <stevebg@adelphia.net>
> Date: 2005/09/04 Sun AM 03:02:10 EDT
> Subject: Labeling points in ListPlot
>
> I have a series of coordinates such as {{x1,y1},{x2,y2},...,{xn,yn}}, a
> few dozen at most. I want to put labels on the points such as p1,
> p2,...,pn, etc. in some desired typeface and size. I also need to
> control the small offset between the label and the dot representing the
> point.
> Does Epilog have anything to do with this? Help doesn't say much about

it.
> Thank you for any info.
>
> Steve Gray
>
>





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.