MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Plotting a function dynamically in a loop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112895] Re: Plotting a function dynamically in a loop
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Tue, 5 Oct 2010 05:34:10 -0400 (EDT)
  • References: <i8c8ub$g9p$1@smc.vnet.net>

It's possible, but you have to make your mind up about what you will
be plotting. Your 'ex' table is f = f(x,y,z); that's 4D, so you can
either plot 2D or 3D slices from this 4D set. You could use color  or
point size or so as the 4th dimension if you like. Data set plots are
done with ListPlot, ListPlot3D, ListContourPlot or ListDensityPlot, or
can be build up using primitive plot directives (such as Point within
a Graphics/Graphics3D environment).

Movies can be made using ListAnimate, or you could print individual
frames in a loop and animate these by using the Graphics/Rendering/
Animate selected graphics menu item.

By the way, tables of items are better build up using Table than using
Do loops.

Cheers -- Sjoerd

On Oct 4, 12:06 pm, ABHIJIT BHATTACHARYYA <b_abhiji... at yahoo.co.in>
wrote:
> Hi!
>
>  Let us consider that I have one 3D array ex[[i,j,k]] which is computed
>  in time loop as given here.
>
>  alfa=0.3; beta=0.4; gamma== 0.5;=0A For[time=0, time<= m=
axtime, time++,
>  Do[ex[[i,j,k]] = alfa*i+beta*j+gamma*k, {i,1,imax}, {j,2,jmax+1},{k,=
1,kmax}]
>
>  (* Plot ex[[]]= dynamically *)
>  ]
>
> What I want is that I like to plot ex[[i,j,k]] at every time step in a =
 single plot so that plot is revealed as a movie.  Is it possible in
>  mathematica?
>
>  Regs
>  Abhijit Bhattacharyya



  • Prev by Date: Re: How to apply a list of functions
  • Next by Date: Re: How to apply a list of functions
  • Previous by thread: Re: Plotting a function dynamically in a loop
  • Next by thread: Re: Plotting a function dynamically in a loop