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
------------------------------------------------------------------------------
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