Re: [Tutor] plotting in python

2011-12-01 Thread stm atoc
For previous script that I have written, I had trouble having one plot for all data at the same time and I could see two line for Conc[0] and Conc[1] separately. Now, even I modified Conc = a[1:, N+1:] to Conc = a[0:, N+1:], still one plot is created...which is pretty good and no error! Thank you

Re: [Tutor] plotting in python

2011-12-01 Thread Andreas Perstinger
[Still top-posting :-( ] On 2011-12-01 11:13, stm atoc wrote: Well, I did also change the line in the python script to this: plot(Conc[0],z,'r-',label='initial') plot(Conc[1],z,'b-',label='after 20s') to see both Conc[0] and [1]. And did it work? I will send the output data attaches to thi

Re: [Tutor] plotting in python

2011-12-01 Thread Andreas Perstinger
[Please don't top-post. Put your answers below the text you cite.] On 2011-12-01 09:01, stm atoc wrote: The output of the print len(Conc[0]), len(z) is 100 3600. Now I changed Conc[0] to Conc[1], and the output is: 100 100 So, you've changed the line print len(Conc[0]), len(z) to print len(

Re: [Tutor] plotting in python

2011-12-01 Thread stm atoc
The output of the print len(Conc[0]), len(z) is 100 3600. Now I changed Conc[0] to Conc[1], and the output is: 100 100 But still I need to see from Concentration from 0. On Thu, Dec 1, 2011 at 5:26 AM, Asokan Pichai wrote: > On Thu, Dec 1, 2011 at 2:38 AM, stm atoc wrote: >> Hi there, >> >> I h

Re: [Tutor] plotting in python

2011-11-30 Thread Asokan Pichai
On Thu, Dec 1, 2011 at 2:38 AM, stm atoc wrote: > Hi there, > > I have a question regarding plotting with Python. > > I have the following python script: [SNIPPED] > plot(Conc[0],z) [SNIPPED] > ---So, What would you suggest? What is the output of print len(Conc[0]), len(z) You may insert t

Re: [Tutor] plotting in python

2011-11-30 Thread Emile van Sebille
On 11/30/2011 1:08 PM stm atoc said... Hi there, I have a question regarding plotting with Python. I have the following python script: # coding: utf-8 from pylab import * import numpy filename='ourtest_out.list' fh=open(filename) line=fh.readline() fh.close z=array([ float(val) for val in l

Re: [Tutor] plotting in python

2011-11-30 Thread Wayne Werner
On Wed, Nov 30, 2011 at 3:08 PM, stm atoc wrote: > Hi there, > > I have a question regarding plotting with Python. > > > ValueError: x and y must have same first dimension > > It looks like something is wrong with the data that you're trying to plot. Specifically, the data that you're trying to

[Tutor] plotting in python

2011-11-30 Thread stm atoc
Hi there, I have a question regarding plotting with Python. I have the following python script: # coding: utf-8 from pylab import * import numpy filename='ourtest_out.list' fh=open(filename) line=fh.readline() fh.close z=array([ float(val) for val in line.split()[1:] ]) a = numpy.loadtxt(fi