Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6432
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: how to plot new data points to pre-existing figure |
| Date | 2011-11-14 12:09 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j9r0ee$bgm$1@smc.vnet.net> (permalink) |
| References | <201111130943.EAA00009@smc.vnet.net> |
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@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@yahoo.com
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: how to plot new data points to pre-existing figure DrMajorBob <btreat1@austin.rr.com> - 2011-11-14 12:09 +0000
csiph-web