Thank you very much!!...'plt.cla()' worked!!
One slight hiccup. Could you please tell me how to fix up the Y grid? I
mean I want every plot to have scale from 0 to 15 (say), not that some will
have -5 to 10 and some will have 5 to 20.Is it possible?...it's
absolutely necessary for the concerned simulation.
:)
Sayan
On 1 April 2013 07:02, Benjamin Root <ben.r...@ou.edu> wrote:
>
>
>
> On Sun, Mar 31, 2013 at 11:51 AM, Sayan Chatterjee <
> sayanchatter...@gmail.com> wrote:
>
>> Thank you very much I have been able to plot from the data files, but
>> facing a slight glitch. The data points are being super imposed in
>> consecutive plots.That means if the 1st data file contains 50 points and
>> the second 30. The second plot will contain 80 points! How to go about this
>> problem?
>>
>> for i in range(0,20):
>> fname = 'file_' + str(i) + '.dat'
>> f=open(fname,"r")
>> x,y = np.loadtxt(fname, unpack=True)
>> plt.scatter(x,y)
>> pylab.savefig(fname + '.png')
>> f.close()
>>
>>
> Sayan,
>
> Try putting "plt.cla()" after the call to "pylab.savefig()".
>
> Ben Root
>
--
--------------------------------------------------------------------------
*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
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users