Hey Sayan,
for reading in simple ASCII-Files containing your two arrays you should
have a look at the numpy.loadtxt function.
Scatter plots in matplotlib are then easily created as shown here
http://matplotlib.org/examples/pylab_examples/scatter_demo.html
For your purpose you can do something like:
import os
import numpy as np
import matplotlib.pyplot as plt
for file in os.path.listdir():
x, y = np.loadtxt(file, unpack=True)
plt.scatter(x,y)
plt.savefig(file + '.png')
Cheers,
Florian
Am 27.03.2013 09:32, schrieb Sayan Chatterjee:
Dear All,
I'm new to Matplotlib. It might be a silly question, how does one plot
data(not functions) in Matplotlib.
How:
1)Two arrays (X and Y) can be plotted in a scatter diagram?
2) or a number of data files can used to produce different plots
having different(sequential) name?
Thanks in anticipation.
Regards,
Sayan
--
--------------------------------------------------------------------------
*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
<http://www.blissprofound.blogspot.com>
Volunteer , Padakshep
www.padakshep.org <http://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
------------------------------------------------------------------------------
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