Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2008

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

Search the Archive

Re: Labeling points

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88768] Re: [mg88744] Labeling points
  • From: "J. McKenzie Alexander" <jalex at lse.ac.uk>
  • Date: Fri, 16 May 2008 05:30:56 -0400 (EDT)
  • References: <200805151149.HAA23447@smc.vnet.net>

One way to annotate graphics like this is to use the Epilog option,  
which allows you to specify arbitrary graphic constructs for inclusion  
in the graphic.

To keep the Epilog option from becoming unreadable (and to give you  
the change to tweak the appearance of the point/label pairs), here's a  
simple function that generates the annotations:

f[lab_, pt_] := {Point[pt], Text[Style[lab, 14], pt, {-1.5, 0}]}

Your plot is then constructed as follows:

Plot[50 x, {x, 0, 2},
  PlotRange -> {{0, 2.25}, {0, 200}},
  PlotStyle -> Blue,
  AspectRatio -> 1,
  AxesLabel -> {"Time", "Damage"},
  PlotRangeClipping -> False,
  Epilog -> {
    AbsolutePointSize[6],
    Point[{0, 0}],
    Point[{0.5, 0}],
    Point[{1.5, 0}],
    Point[{2.0, 0}],
    f["50%", {0.5, 50}],
    f["75%", {1, 50}],
    f["88%", {1.5, 50}],
    f["94%", {2, 50}],
    f["25%", {1, 100}],
    f["50%", {1.5, 100}],
    f["69%", {2, 100}],
    f["13%", {1.5, 150}],
    f["31%", {2, 150}],
    f["6%", {2, 200}]
    }
  ]

Jason

On 15 May 2008, at 12:49, 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?
>
>
>

--
Dr J. McKenzie Alexander
Department of Philosophy, Logic and Scientific Method
London School of Economics and Political Science
Houghton Street, London WC2A 2AE




Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm


  • Prev by Date: Re: cell convert to
  • Next by Date: Re: RenderBadPicture error while running Mathematica 6 on Linux
  • Previous by thread: Re: Labeling points
  • Next by thread: Re: Labeling points