comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Labelling Highs/Lows in contour
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Labelling Highs/Lows in contour [message #12484] Thu, 13 August 1998 00:00
Phillip & Suzanne[2] is currently offline  Phillip & Suzanne[2]
Messages: 3
Registered: August 1998
Junior Member
David Fanning wrote:
>
> Amit (amit@physics.utoronto.ca) writes:
>
>> Is there a way to automatically label highs and lows on a contour plot ? For
>> example place an L or H in a trough or peak respectively.
>
> I think you stumbled into the wrong newsgroup. I think
> you want alt.simple.meteorology. This is a group for
> IDL programmers. :-)

Shame on you, David. You're usually nice and polite, and I was quite shocked
to see such a response from you! Assuming Amit really wanted to make a
meteorological-type plot using IDL's contour routine, he did ask in the
correct place.

At a guess, I would write the contour the usual way, then find the max and min
of the underlying data, calculate coordinates into the plot based on the
locations of the max and min, and place (in overplot mode -- I don't remember
the name of the function to do this) an L at the min and an H at the max.
That's the simplest algorithm I can think of.

> Cheers,

> David

> P.S. Does anyone know how to find the slope of
> a 2D array. :-(

I'd recommend posting this question separately.

I assume you'd like to find the localized slope at each of the points in the
array. You'll probably have to find the slope along a given intercepting
plane, such as the x or y axis. For cuts running along the x or y axes, you
could probably fake it by taking the slope of the points on that particular
cut. For cuts at an angle, this is going to be nasty...

My next thought is that this might just be the first derivative of the
function generating your surface. If that's the case, take a derivative if
you know the function. If you don't know the function that defines your
surface, however, good luck...

Phillip (& Suzanne) David
Trying to dredge up a little of our college math...
Re: Labelling Highs/Lows in contour [message #12489 is a reply to message #12484] Thu, 13 August 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Amit (amit@physics.utoronto.ca) writes:

> Is there a way to automatically label highs and lows on a contour plot ? For
> example place an L or H in a trough or peak respectively.

I think you stumbled into the wrong newsgroup. I think
you want alt.simple.meteorology. This is a group for
IDL programmers. :-)

Cheers,

David

P.S. Does anyone know how to find the slope of
a 2D array. :-(

--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: rendering device for window objects
Next Topic: Re: Returning values within _EXTRA.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 09:21:27 PDT 2025

Total time taken to generate the page: 0.80212 seconds