Re: [Matplotlib-users] Plotting from datafile

2013-04-01 Thread Sayan Chatterjee
Thanks Benjamin...I put that plt.ylim earlier but at a wrong place. It worked. Thanks again! On 1 April 2013 19:01, Benjamin Root wrote: > > > On Mon, Apr 1, 2013 at 7:29 AM, Sayan Chatterjee < > sayanchatter...@gmail.com> wrote: > >> Thank you very much!!...'plt.cla()' worked!! >> >> One sligh

Re: [Matplotlib-users] Plotting from datafile

2013-04-01 Thread Benjamin Root
On Mon, Apr 1, 2013 at 7:29 AM, Sayan Chatterjee wrote: > 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 2

Re: [Matplotlib-users] Plotting from datafile

2013-04-01 Thread Sayan Chatterjee
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 si

Re: [Matplotlib-users] Plotting from datafile

2013-03-31 Thread Benjamin Root
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

Re: [Matplotlib-users] Plotting from datafile

2013-03-31 Thread Sayan Chatterjee
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

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Steven Boada
Hey Sayan, Here is the manual page: http://docs.scipy.org/doc/numpy/reference/generated/numpy.genfromtxt.html It works (basically) the same as loadtxt, but it is more flexible when there are holes in your data. Good luck. Steven On Wed Mar 27 10:07:10 2013, Sayan Chatterjee wrote: > Hi Steve

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Sayan Chatterjee
Hi Steven, I am a newbie to Python and hence Matplotlib. I cannot get your point properly. Could you please redirect me to a page where the usage is demonstrated? As I can see, you're a doctoral student in Physics, it might be worthwhile to tell you that I'm trying to code a Zeldovich Approximat

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Steven Boada
Another, slightly more flexible, option is the genfromtxt function, also in numpy. Normally you should try genfromtxt after loadtxt doesn't work. Or, that is my normal method. Steven On Wed Mar 27 07:16:45 2013, Sayan Chatterjee wrote: > Thank you very much for your prompt reply. > > Florian,

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Alexander Eberspaecher
On Wed, 27 Mar 2013 14:02:58 +0530 Sayan Chatterjee wrote: > I'm new to Matplotlib. It might be a silly question, how does one plot > data(not functions) in Matplotlib. Besides the solution given in the first reply, you may also check https://github.com/dmcdougall/mpl_binutils Regards Alex --

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Sayan Chatterjee
Thank you very much for your prompt reply. Florian, your reply seems to be the answer to my question. I'll try it out. If can't figure out,I'll get back to you. On 27 March 2013 15:37, Florian M. Wagner wrote: > Hey Sayan, > > for reading in simple ASCII-Files containing your two arrays you

Re: [Matplotlib-users] Plotting from datafile

2013-03-27 Thread Florian M. Wagner
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 somethi

[Matplotlib-users] Plotting from datafile

2013-03-27 Thread 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 anti