[Tutor] HELP: Creating animation from multiple plots
Sayan Chatterjee
sayanchatterjee at gmail.com
Wed Mar 27 07:36:39 CET 2013
Thanks a lot for your prompt reply.
1. Yes. This is exactly what I wanted. Creating a bunch of data sets and
then writing script to plot them using gnuplot, but if something can
produce directly 'plots' it will certainly be helpful.
2. Yes. By stitching them up I meant an animation.Sorry for the
ambiguity. Exactly how we can do it Octave.
Pls see this link:
http://www.krizka.net/2009/11/06/creating-animations-with-octave/
I think Python is THE language, which may come to an immediate rescue.
My OS is Linux Mint (Gnome 3)
Sayan
On 27 March 2013 11:57, Amit Saha <amitsaha.in at gmail.com> wrote:
> On Wed, Mar 27, 2013 at 4:23 PM, Amit Saha <amitsaha.in at gmail.com> wrote:
> > Hi Sayan,
> >
> > On Wed, Mar 27, 2013 at 4:14 PM, Sayan Chatterjee
> > <sayanchatterjee at gmail.com> wrote:
> >> Dear All,
> >>
> >> I am a newbie to Python but have a fair know how of other languages i.e
> C
> >> etc.
> >>
> >> I want to run an astrophysical simulation in Python. All I have to do
> it to
> >> generate a set of 'plots' depending on a varying parameter and then
> stitch
> >> them up.
> >>
> >> 1) Is it possible to automatically generate different data files( say
> in the
> >> orders of 1000) with different names depending on a parameter?
> >
> > It certainly is. Are you talking about the file names being
> > file_1001.txt, file_1002.txt and so on? If yes, let's say your
> > parameter values are stored in param. Then something like this would
> > do the trick:
> >
> > param_values = [1000,1001, 1005, 2001]
> >
> > for param in param_values:
> > fname = 'file_' + str(param)
> >
> >
> > # write to file fname
> > #
> > #
> >
> >
> > Sorry if its different from what you are looking for. But yes, its
> > certainly possible.
> >
> >
> >>
> >> 2) Is it possible to plot the data sets right from Python itself and
> save
> >> the plots in different jpeg files to stitched upon later on.
> >
> > It is possible to generate plots and save each as JPEGs. [1].
> >
> > What do you mean by stitching together?
>
> You probably meant creating an animation from them. Yes, it is
> certainly possible. I will try to find a link which makes it really
> easy to create an animation out of a bunch of images. Which operating
> system are you on?
>
> -Amit.
>
>
>
> --
> http://amitsaha.github.com/
>
--
--------------------------------------------------------------------------
*Sayan Chatterjee*
Dept. of Physics and Meteorology
IIT Kharagpur
Lal Bahadur Shastry Hall of Residence
Room AB 205
Mob: +91 9874513565
blog: www.blissprofound.blogspot.com
Volunteer , Padakshep
www.padakshep.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130327/46d793c5/attachment.html>
More information about the Tutor
mailing list