ocean profile

So, after mailing all the previous mails, I’ve thought maybe I’m not asking the right question.
What I want to do plot is a cross section, and there is no easy way to extrapulate between points. Not in excell and not in matlab.

here is a simplification:

                                             distance
···
                        x                                  x
            x                       x                              x

y                y          y                y          y                   y
     
         z       
                      z                   z               z              z   

suppose the letters represent the temps: 29, 26, 23 deg. cel. and the unmarked y axis is depth.
Now I want to draw contours between the x’s y’s and z’s. This will allow me to create very quickly lots’ of graph of temp. prfiles of the gulf.

Many thanks, again. Oz

Oz Nahum wrote:

What I want to do plot is a cross section, and there is no easy way to extrapulate between points. Not in excell and not in matlab.

I hope you mean interpolate -- extrapolation is fraught with danger!

here is a simplification:

                                                 distance
_____________________________________________________
>
> x x
> x x x
>
> y y y y y y
> > z > z z z z >
>

Now I want to draw contours between the x's y's and z's. This will allow me to create very quickly lots' of graph of temp. prfiles of the gulf.

OK, it looks like what you've got is some data on an irregularly spaced grid, in x.y space. To draw a contour plot of that data, you need to interpolate it onto a regular grid. Here is wiki page about that:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

In there, is says that MPL does not have this functionality built in -- is that still true?

If so, I'd like to see the Delaunay stuff included -- in fact, you could contour irregular data directly using Delaunay triangulation.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...259...

I'd love to see it included to -- I believe the problem is finding a
good code that is BSD compatible.

JDH

···

On Wed, Jul 16, 2008 at 5:51 PM, Christopher Barker <Chris.Barker@...259...> wrote:

In there, is says that MPL does not have this functionality built in --
is that still true?

If so, I'd like to see the Delaunay stuff included -- in fact, you could
contour irregular data directly using Delaunay triangulation.

I have not been following this thread so sorry if this
proves irrelevant.

I assume you know of Robert Kern's code?
<URL:http://cours-info.iut-bm.univ-fcomte.fr/docs/python/scipy/scipy.sandbox.delaunay-module.html>

Cheers,
Alan Isaac

···

On Wed, Jul 16, 2008 at 5:51 PM, Christopher Barker wrote:

I'd like to see the Delaunay stuff included -- in fact,
you could contour irregular data directly using Delaunay
triangulation.

On Wed, 16 Jul 2008, John Hunter apparently wrote:

I'd love to see it included to -- I believe the problem is finding a
good code that is BSD compatible.

I'd love to see it included to -- I believe the problem is finding a

> good code that is BSD compatible.
Yes.
Some examples on plotting data using spatial interpolation would be very nice.

One with the delauny package:
see below at: http://scipy.org/scipy/scikits/

And one with griddata:
http://code.google.com/p/griddata-python/

We could use the accepted data sets from
http://www.itc.nl/personal/rossiter/teach/lecnotes.html#l6

I have tested the griddata package but didn't reach very far due to other task to be accomplished earlier.

Kind regards,
Timmie

I was aware of the project but always assumed he was relying on some
GPL/LGPL code since it wasn't in scipy proper, but I now see this is
not the case. I just talked with Jeff Whitaker who wrote the griddata
functionality on top of NCAR's natgrid (GPL), and he expressed a
willingness to port his code to use Robert's code, which we could
include in mpl. Robert, what is the reason this hasn't gone into
scipy proper, and do you see any problems with us folding it into mpl
for use by griddata?

Thanks,
JDH

···

On Wed, Jul 16, 2008 at 6:59 PM, Alan G Isaac <aisaac@...310...> wrote:

I assume you know of Robert Kern's code?
<URL:http://cours-info.iut-bm.univ-fcomte.fr/docs/python/scipy/scipy.sandbox.delaunay-module.html>