Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12948 > unrolled thread
| Started by | dabd <dario.rehman@gmail.com> |
|---|---|
| First post | 2012-12-27 10:02 +0000 |
| Last post | 2012-12-31 01:49 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Attach legend to a family of functions? dabd <dario.rehman@gmail.com> - 2012-12-27 10:02 +0000
Re: Attach legend to a family of functions? "Nasser M. Abbasi" <nma@12000.org> - 2012-12-28 10:32 +0000
Re: Attach legend to a family of functions? Helen Read <readhpr@gmail.com> - 2012-12-28 10:32 +0000
Re: Attach legend to a family of functions? dabd <dario.rehman@gmail.com> - 2012-12-31 01:49 +0000
| From | dabd <dario.rehman@gmail.com> |
|---|---|
| Date | 2012-12-27 10:02 +0000 |
| Subject | Attach legend to a family of functions? |
| Message-ID | <kbh6cg$iht$1@smc.vnet.net> |
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.
[toc] | [next] | [standalone]
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Date | 2012-12-28 10:32 +0000 |
| Message-ID | <kbjsfs$mvp$1@smc.vnet.net> |
| In reply to | #12948 |
On 12/27/2012 4: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.
>
V9:
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 -> "Expressions"]
screen shot:
http://12000.org/tmp/122712/plot.png
[toc] | [prev] | [next] | [standalone]
| From | Helen Read <readhpr@gmail.com> |
|---|---|
| Date | 2012-12-28 10:32 +0000 |
| Message-ID | <kbjsgh$n09$1@smc.vnet.net> |
| In reply to | #12948 |
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.
>
[toc] | [prev] | [next] | [standalone]
| From | dabd <dario.rehman@gmail.com> |
|---|---|
| Date | 2012-12-31 01:49 +0000 |
| Message-ID | <kbqqum$7ub$1@smc.vnet.net> |
| In reply to | #12969 |
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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web