MathGroup Archive 2012

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

Search the Archive

Re: Attach legend to a family of functions?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129301] Re: Attach legend to a family of functions?
  • From: dabd <dario.rehman at gmail.com>
  • Date: Sun, 30 Dec 2012 20:49:09 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kbh6cg$iht$1@smc.vnet.net> <kbjsgh$n09$1@smc.vnet.net>

On Friday, December 28, 2012 10:32:49 AM UTC, Helen Read wrote:
> Assuming Mathematica 9, use PlotLegends.
> 
> 
> 
> Plot[Evaluate[{(1 + x - t - 4 x (1 + x) t +
> 
>         Sqrt[(x + 2 x^2)^2 t])/((1 + 2 x)^2 t - 1)} /.
> 
>     t -> Range[0, 1, 0.1]], {x, 0, 20}, PlotLegends -> Range[0, 1, .1]]
> 
> 
> 
> Or slightly fancier:
> 
> 
> 
> Plot[Evaluate[{(1 + x - t - 4 x (1 + x) t +
> 
>         Sqrt[(x + 2 x^2)^2 t])/((1 + 2 x)^2 t - 1)} /.
> 
>     t -> Range[0, 1, 0.1]], {x, 0, 20},
> 
>   PlotLegends ->
> 
>    LineLegend[Range[0, 1, .1], LegendLabel -> "Value of t",
> 
>     LegendFunction -> "Frame", LegendMargins -> 5,
> 
>     Background -> LightGray]]
> 
> 
> 
> Helen Read
> 
> University of Vermont
> 
> 
> 
> On 12/27/2012 5:02 AM, dabd wrote:
> 
> > How can I attach a legend to this plot?
> 
> >
> 
> > Plot[Evaluate[{(1+x-t-4x(1+x)t+Sqrt[(x+2x^2)^2 t])/((1+2x)^2 t-1)}/.t->Range[0,1,0.1]],{x,0,20}]
> 
> >
> 
> > I would like a legend for each t in the range.
> 
> >
> 
> > Thanks.
> 
> >

Thanks this looks nice.



  • Prev by Date: Re: question
  • Next by Date: Re: Cursor position on images
  • Previous by thread: Re: Attach legend to a family of functions?
  • Next by thread: Minimizing Suggestions Bar