Hey,

That's quite simple.  Assume your file containing the data is name  
Data.dat and is in the same directory than your python script.

from pylab import *
from numpy import *

tab = load('Data.dat') #load the file
r = tab[:,0] #get the r coordinates
theta = tab[:,1] #get the theta coordinates
T =  tab[:,2] #get the temperature

# now, you can process/plot your data

Hope this help.

Best regards.

Benoit


Le 25-juin-07 à 19:03, Lorenzo Isella a écrit :

> Dear All,
> I am quite a newbie about Python and Pylab, but I am starting to like
> the ease you can develop with using these tools.
> I am interested in 2D radial plots (think for instance about the plot
> of the temperature along the cross-section of a pipe).
> I had a look at the tutorial online, in particular to the case  
> described in:
>
> http://matplotlib.sourceforge.net/screenshots/polar_demo.py
>
> but there is something which is not 100% clear to me.
> What if, instead of having an analytical expression for the quantity I
> want to plot I have to read it (together with the r and theta
> coordinates) from a file, e.g.:
>
> r      theta       T
>
>
> where the columns r and theta contain the list of (r,theta)
> coordinates (the "grid" I am using along the cross section) and T the
> temperature evaluated at that grid point?
> If necessary, I can post an example file (but at the moment I am
> working with fairly big files and I think I conveyed an idea of what I
> am after).
> Many thanks
>
> Lorenzo
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Dr. Benoit Donnet
Université Catholique de Louvain (UCL)
Faculté des Sciences Appliquées - Département d'Ingénierie  
Informatique (INGI)
Place Sainte Barbe, 2
1348 Louvain-la-Neuve
Belgium
Phone: +32 10 47 87 18
Home page: http://inl.info.ucl.ac.be/donnet




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to