Re: Do Plot
- To: mathgroup at smc.vnet.net
- Subject: [mg129123] Re: Do Plot
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Mon, 17 Dec 2012 02:54:34 -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: <20121216100503.A648D692C@smc.vnet.net>
It did work, it just didn't "Do" what you expected. As stated in the
documentation for Do:
"Unless an explicit Return is used, the value returned by Do is Null."
Alternatives:
Do[
Print[
Plot[x^2 + c, {x, -2, 2}]],
{c, -1, 1, 0.2}]
Table[
Plot[x^2 + c, {x, -2, 2}],
{c, -1, 1, 0.2}]
Plot[
Evaluate[
Table[
Tooltip[x^2 + c, c],
{c, -1, 1, 0.2}]],
{x, -2, 2}]
Manipulate[
Plot[x^2 + c, {x, -2, 2},
PlotRange -> {-1.2, 5}],
{c, -1, 1, 0.2,
Appearance -> "Labeled"}]
Bob Hanlon
On Sun, Dec 16, 2012 at 5:05 AM, <dwarnold45 at suddenlink.net> wrote:
> Should this command work in Mathematica 9?
>
> Do[Plot[x^2 + c, {x, -2, 2}], {c, -1, 1, 0.2}]
>
> Not working on my Macbook Pro, Snow Leopard 10.6.8.
>
> David.
>
- References:
- Do Plot
- From: dwarnold45@suddenlink.net
- Do Plot