Re: how to plot new data points to pre-existing figure
- To: mathgroup at smc.vnet.net
- Subject: [mg122882] Re: how to plot new data points to pre-existing figure
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Mon, 14 Nov 2011 07:07:07 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- References: <201111130943.EAA00009@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
This might start you in a useful direction:
Clear[testPlot]
testPlot[i_] := Module[{z}, z[x_, m_] = m*x;
Plot[z[x, i], {x, 0, 10}, PlotRange -> {{0, 10}, {0, 20}}]]
Animate[testPlot@i, {i, 0, 5, .1},
AnimationDirection -> ForwardBackward]
Bobby
On Sun, 13 Nov 2011 03:43:35 -0600, tle <truongvle at yahoo.com> wrote:
> Hi,
>
> Could someone please tell me how to delete the old figure and create a
> new one in a for loop.
>
> thanks,
>
> testPlot[k_] := Module[{i, n, m, z},
> z[x_, m_] = m*x;
> For[i = 1, i < k,
> Print[{i}];
> plot1 =
> Plot[z[x, i], {x, 0, 10}, PlotRange -> {{0, 10}, {0, 20}}];
> Print[plot1];
> i++];
> ]
>
--
DrMajorBob at yahoo.com
- References:
- how to plot new data points to pre-existing figure
- From: tle <truongvle@yahoo.com>
- how to plot new data points to pre-existing figure