Re: How to put parameter list in or near a graph?
- To: mathgroup at smc.vnet.net
- Subject: [mg34239] Re: [mg34221] How to put parameter list in or near a graph?
- From: BobHanlon at aol.com
- Date: Sat, 11 May 2002 04:04:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 5/10/02 3:56:53 AM, rob at piovere.com writes: >Very often I make a plot which shows the essence of my results but then, >to present it, I print the plot and then I have to hand write all the parameters >onto the plot area. Surely there is a way to overlay onto the plot things >like >"a = 1.2, b= 2.0,....." and save me all that trouble (and the chance of >making errors). > >I'd even settle for printing a line under the plot which displays the same >info -- I can't even figure out how to do that. I can make it output each >parameter but it takes a full line for each one and this takes up a lot >of paper. To apply labels use Text with either Prolog or Epilog Clear[f]; a=1;b=-4; c=3; f[x_] := a*x^2+b*x+c; soln=Solve[f[x]==0, x]; Plot[f[x], {x, 0, 5}, Frame->True, Axes->False, PlotStyle -> RGBColor[0, 0, 1], PlotLabel -> "Quadratic "<> ToString[TraditionalForm[f[x]]], Prolog ->{(n=Sign[D[f[x],x] /.soln[[1,1]]]; Text["x="<>ToString[#], {#,0},{-1,(-1)^n++}]&/@ (x/.soln)), AbsolutePointSize[5], RGBColor[1, 0, 0], Point[{x,0}] /.soln}, ImageSize -> 400]; Bob Hanlon Chantilly, VA USA