Re: Re: Labeling points

*To*: mathgroup at smc.vnet.net*Subject*: [mg88814] Re: [mg88760] Re: [mg88744] Labeling points*From*: Christopher Carlson <carlson at wolfram.com>*Date*: Sat, 17 May 2008 05:31:00 -0400 (EDT)*References*: <200805151149.HAA23447@smc.vnet.net> <200805160929.FAA00887@smc.vnet.net>

On May 16, 2008, at 4:29 AM, Christopher Carlson wrote: > On May 15, 2008, at 6:49 AM, AngleWyrm wrote: >> Here's a graphic I created for a discussion on game theory: >> http://home.comcast.net/~anglewyrm/thread/dps.png >> >> I put the text next to the points in as a post-processing step by >> hand in >> PhotoShop. >> >> Is there a way to get mathematica to display such information? > > > You can post-process plot output to add the information you want. For > example, here is a ListPlot: > > plot = ListPlot[Table[{x, y}, {x, 1, 4}, {y, 1, x}], AxesOrigin -> {0, > 0}] That first reply was truncated somehow. Here's the rest... To add labels the the ListPlot output, I (1) replace Point objects in the output with labeled Points, (2) wrap the result with Show[..., PlotRangeClipping->False], which prevents labels that fall outside of the plot range from being clipped. Show[ plot /. Point[pts_] :> ({Point[#], Black, Text[Row[{IntegerPart[100 #[[2]]/5], "%"}], #, {-1.5, -1}]} & /@ pts), PlotRangeClipping -> False] Christopher Carlson User Interface Group Wolfram Research, Inc

**References**:**Labeling points***From:*"AngleWyrm" <anglewyrm@yahoo.com>

**Re: Labeling points***From:*Christopher Carlson <carlson@wolfram.com>