       Re: Interactive plotting in Mathematica?

• To: mathgroup at smc.vnet.net
• Subject: [mg5634] Re: [mg5596] Interactive plotting in Mathematica?
• From: Sherman Reed <Sherman.Reed at worldnet.att.net>
• Date: Wed, 1 Jan 1997 21:04:59 -0500
• Sender: owner-wri-mathgroup at wolfram.com

```At 06:59 AM 12/27/96 +0000, you wrote:
>One of the downsides of plotting in Mathematica that I've found is that it
>is not interactive -- at least I've never found a way to do it.  I always
>have to do the _whole_ calculation (creating a big list or whatever), then
>do the plotting in a "post calculation" fashion.
>
>I'd really love to plot as I calculate (e.g. solve an ODE and plot the
>solution as you generate a list of solution vectors).  Even better would
>be to be able to interrupt the calculation/plot (cmd-period ?) if things
>look bad and be able to reset parameters to new values or plot settings,
>then start again.  That type of approach to calculations and graphics is
>very useful and quite common in science.
>
>Can this be done in Mathematica?
>
>Lou Pecora
>code 6343
>Naval Research Lab
>Washington  DC  20375
>USA
> == My views are not those of the U.S. Navy. ==
>
>------------------------------------------------------------
>
>  http://natasha.umsl.edu/Exp_Chaos4/
>
>------------------------------------------------------------
>
>
Lou,

This is fairly crude, but it should give
you some idea what can be done for plotting
on the go.  The code below calculates a 1000
points of a sine wave, and then plots them.
it then calculates another 1000 points and
plots the total, etc.

I will look at how to alter parameters
interactively whichcan be inserted
after the ListPlot command.  I have
done this in the past on 2.2 but not
on 3.0.

It can be made more efficient, but my
purpose was to show you what could be done.

Sherman C. Reed

imin=1;imax=1001;data=Table[0,{i,1,10000}];
For[j=1,j<11,j++,
{For[i=imin,i<imax,i++,
data[[i]]=Sin[i*2*Pi/(imax/j)]
(* data[[i]] is being *)
(* calculated *)
],
ListPlot[data,PlotJoined->True],
(* the above plots the data so far *)
imin=imin+1000,imax=imax+1000}
]

```

• Prev by Date: Re: Re: Replacing part of a matrix by another
• Next by Date: RE: HELP: Legendre transform
• Previous by thread: Re: Re: Replacing part of a matrix by another
• Next by thread: RE: HELP: Legendre transform