MathGroup Archive 2005

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

Search the Archive

Re: Labeling points in ListPlot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60156] Re: [mg60145] Labeling points in ListPlot
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 5 Sep 2005 02:27:49 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

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 at adelphia.net>
To: mathgroup at smc.vnet.net
> Date: 2005/09/04 Sun AM 03:02:10 EDT
> Subject: [mg60156] [mg60145] 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
> 
> 


  • Prev by Date: Re: MakeBoxes vs Format
  • Next by Date: Re: Labeling points in ListPlot
  • Previous by thread: Labeling points in ListPlot
  • Next by thread: Re: Labeling points in ListPlot