<div dir="ltr">Thanks a lot for your prompt reply.<div><br></div><div>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.</div>
<div><br></div><div style>2. Yes. By stitching them up I meant an animation.Sorry for the ambiguity. Exactly how we can do it Octave.</div><div style><br></div><div style>Pls see this link: <a href="http://www.krizka.net/2009/11/06/creating-animations-with-octave/">http://www.krizka.net/2009/11/06/creating-animations-with-octave/</a></div>
<div style><br></div><div style>I think Python is THE language, which may come to an immediate rescue.</div><div style><br></div><div style>My OS is Linux Mint (Gnome 3)</div><div style><br></div><div style>Sayan</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 27 March 2013 11:57, Amit Saha <span dir="ltr"><<a href="mailto:amitsaha.in@gmail.com" target="_blank">amitsaha.in@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Wed, Mar 27, 2013 at 4:23 PM, Amit Saha <<a href="mailto:amitsaha.in@gmail.com">amitsaha.in@gmail.com</a>> wrote:<br>
> Hi Sayan,<br>
><br>
> On Wed, Mar 27, 2013 at 4:14 PM, Sayan Chatterjee<br>
> <<a href="mailto:sayanchatterjee@gmail.com">sayanchatterjee@gmail.com</a>> wrote:<br>
>> Dear All,<br>
>><br>
>> I am a newbie to Python but have a fair know how of other languages i.e C<br>
>> etc.<br>
>><br>
>> I want to run an astrophysical simulation in Python. All I have to do it to<br>
>> generate a set of 'plots' depending on a varying parameter and then stitch<br>
>> them up.<br>
>><br>
>> 1) Is it possible to automatically generate different data files( say in the<br>
>> orders of 1000) with different names depending on a parameter?<br>
><br>
> It certainly is. Are you talking about the file names being<br>
> file_1001.txt, file_1002.txt and so on? If yes, let's say your<br>
> parameter values are stored in param. Then something like this would<br>
> do the trick:<br>
><br>
> param_values = [1000,1001, 1005, 2001]<br>
><br>
> for param in param_values:<br>
> fname = 'file_' + str(param)<br>
><br>
><br>
> # write to file fname<br>
> #<br>
> #<br>
><br>
><br>
> Sorry if its different from what you are looking for. But yes, its<br>
> certainly possible.<br>
><br>
><br>
>><br>
>> 2) Is it possible to plot the data sets right from Python itself and save<br>
>> the plots in different jpeg files to stitched upon later on.<br>
><br>
> It is possible to generate plots and save each as JPEGs. [1].<br>
><br>
> What do you mean by stitching together?<br>
<br>
</div></div>You probably meant creating an animation from them. Yes, it is<br>
certainly possible. I will try to find a link which makes it really<br>
easy to create an animation out of a bunch of images. Which operating<br>
system are you on?<br>
<span class="HOEnZb"><font color="#888888"><br>
-Amit.<br>
<br>
<br>
<br>
--<br>
<a href="http://amitsaha.github.com/" target="_blank">http://amitsaha.github.com/</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><br></div><font><span style="font-family:garamond,serif"><div><font><span style="font-family:garamond,serif"><br></span></font></div>--------------------------------------------------------------------------<br>
</span></font><b><font style="font-family:garamond,serif" face="georgia, serif">Sayan Chatterjee</font></b><font><br style="font-family:garamond,serif"><span style="font-family:garamond,serif">Dept. of Physics and Meteorology</span><br style="font-family:garamond,serif">
</font><div style="font-family:garamond,serif"><font style="font-family:times new roman,serif">IIT Kharagpur<br>Lal Bahadur Shastry Hall of Residence<br>Room AB 205<br>Mob: +91 9874513565</font><font><br>blog: <a href="http://www.blissprofound.blogspot.com" target="_blank">www.blissprofound.blogspot.com</a><br>
<br>Volunteer , Padakshep<br><a href="http://www.padakshep.org" target="_blank">www.padakshep.org</a><br></font></div>
</div>