Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-17 Thread Ryan May
Michael Droettboom wrote: > Oz Nahum wrote: >> I am mostly frustrated with documentation writers who write very nice >> tutorials describing how to plot completely unusfull graphs of spheres >> inside loops and a dolphin swimming in the middle. > I'm sorry. I just couldn't resist writing a tutor

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Alan G Isaac
On Wed, 16 Jul 2008, Michael Droettboom apparently wrote: > [Attachment: dolphin.py : TEXT/PLAIN, 62 lines] I have to say, I was completely unaware of the path.Path capability of Matplotlib, but even if I had known of it, I would not have thought of how to exploit it this way. Even though this

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Christopher Barker
Oz Nahum wrote: > I still get this error > Traceback (most recent call last): > File "yael.py", line 24, in > x = x.transpose() > AttributeError: 'tuple' object has no attribute 'transpose' as someone suggested, you really want to read up on numpy -- the transpose method is a method of num

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Dear Mike, I really laughed. Many thanks. It's almost to late for me to really understand the code now. But some how you managed to throw in some stuff that can help: you've made what I've wanted except for the dolphin. I am sorry about the exagerating, but everybody here keep talking about this yo

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Michael Droettboom
Oz Nahum wrote: I am mostly frustrated with documentation writers who write very nice tutorials describing how to plot completely unusfull graphs of spheres inside loops and a dolphin swimming in the middle. I'm sorry. I just couldn't resist writing a tutorial example for this. Please take it

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
I still get this error Traceback (most recent call last): File "yael.py", line 24, in x = x.transpose() AttributeError: 'tuple' object has no attribute 'transpose' and one more thing I discovered. the Data points that are ploted are not temperature... this are the depth:distance coordinates

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread John Hunter
On Wed, Jul 16, 2008 at 3:18 PM, Oz Nahum <[EMAIL PROTECTED]> wrote: >>You can transpose your inputs. For numpy arrays: x = x.transpose() > > i wrote: > for np arrays: x = x.transpose() > > but I still get a syntax error. umm that was english, not python. They python is x = x.transpose(

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Tim Michelsen
Oz Nahum schrieb: > Hi, > I want to draw a contour plot which uses data from files. I know how to > import the files, so it's not the main issue. I was discussion a similar issue with Jeff this week. Take a look at the thread: http://news.gmane.org/gmane.comp.python.matplotlib.general Unfortunat

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
>You can transpose your inputs. For numpy arrays: x = x.transpose() i wrote: for np arrays: x = x.transpose() but I still get a syntax error. > > Also, one more thing, I can't find how to expand the borders of the plot, > > say from 350 to 400 > > (same for depth) I tried usig xlim and ylim(0

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread John Hunter
On Wed, Jul 16, 2008 at 2:58 PM, Oz Nahum <[EMAIL PROTECTED]> wrote: > Here is why the contours are wrong: > they are ploted verticaly, while I think, it is more common to draw temp. > contours in oceanography when the are horizontal. You can transpose your inputs. For numpy arrays: x = x.transpo

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Here is why the contours are wrong: they are ploted verticaly, while I think, it is more common to draw temp. contours in oceanography when the are horizontal. Also, one more thing, I can't find how to expand the borders of the plot, say from 350 to 400 (same for depth) I tried usig xlim and ylim(

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Eric Firing
Oz Nahum wrote: > Hi Eric, > really thanks for your help so far. I am doing a quick short course, and > I'll do the examples later. > I've fixed the code, here it is: > > from matplotlib import pyplot as plt > temperature=[ > [10,8,6], > [9,7,5], > [8,7,4] > ]

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Hi Eric, really thanks for your help so far. I am doing a quick short course, and I'll do the examples later. I've fixed the code, here it is: from matplotlib import pyplot as plt temperature=[ [10,8,6], [9,7,5], [8,7,4] ] distance = (100,200,300) depth = (100,

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Eric Firing
Oz Nahum wrote: > Ok, I played with it a little bit. > > Here is what I know: > importing the data is not a big issue, I aready wrote a tutorial about > it here: > http://www.tabula0rasa.org/?p=21 > > here is a sample code I wrote. > from matplotlib import pyplot as plt > from pylab import * > t

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread John Hunter
On Wed, Jul 16, 2008 at 1:25 PM, Oz Nahum <[EMAIL PROTECTED]> wrote: > Ok, I played with it a little bit. > > Here is what I know: > importing the data is not a big issue, I aready wrote a tutorial about it > here: > http://www.tabula0rasa.org/?p=21 There are a couple of functions for loading ASCI

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Ok, I played with it a little bit. Here is what I know: importing the data is not a big issue, I aready wrote a tutorial about it here: http://www.tabula0rasa.org/?p=21 here is a sample code I wrote. from matplotlib import pyplot as plt from pylab import * temperature=[ [1,3,4],

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Eric Firing
Oz Nahum wrote: > Thanks for the quick answer. > So if I have a series of 18 points withe measured distance, and 18 data > points with distance, it makes it almost impossible to build the graph > ??? I can't type 18^18 points I want the computer to plot the points > and extrapulate between t

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Thanks for the quick answer. So if I have a series of 18 points withe measured distance, and 18 data points with distance, it makes it almost impossible to build the graph ??? I can't type 18^18 points I want the computer to plot the points and extrapulate between them... excuse me the possibl

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Eric Firing
Oz Nahum wrote: > Hi, > I want to draw a contour plot which uses data from files. I know how to > import the files, so it's not the main issue. > Let's say I want to do a profile which has the following data: > distance, depth and some oceanographic data like temp, oxygen and stuff > > so for

[Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
Hi, I want to draw a contour plot which uses data from files. I know how to import the files, so it's not the main issue. Let's say I want to do a profile which has the following data: distance, depth and some oceanographic data like temp, oxygen and stuff so for simplicity lets say I have: d