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

Home » Public Forums » archive » Re: filled contour chart problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: filled contour chart problems [message #43114 is a reply to message #43111] Tue, 15 March 2005 10:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
psbeps@hotmail.com writes:

> I am having problems getting some filled contour charts of sea surface
> temperature to look right on a new Linux machine. They look fine on
> the old machine with the exact same program, and other types of contour
> charts on the new machine are fine. The old machine had IDL Version
> 5.3 and the new machine has IDL Version 6.1.
>
> The contouring and filling is correct, and the graphic size is correct
> (the entire image size), but the graphic position and size of just the
> contoured area (without the color bar etc) is incorrect. I suppressed
> the lat/lon box using xstyle and ystyle=4 in the contour command since
> it does not line up with the (correct) lat/lon box from PLOT.
>
> Also, I can't get it to do the contouring, grid lines, and continents
> all at once. I can either have it do just the continents and grid
> lines, or just the contoured part without continents or grid lines.
> When I take longitude and latitude off of the contour commands, the
> size changes, but is still wrong. When I try to have contouring and
> continents together, I get this error:
> MAP_CONTINENTS: Map transform not established.
> When I try to have contouring and grid lines, I get this error:
> MAP_GRID: map_grid---Current ploting device must have mapping
> coordinates
> It's as if it is not recognizing MAP_SET?
> I can get it to draw solid grid lines using PLOT since MAP_GRID does
> not work (although I wanted dotted lines using MAP_GRID).
> Any help in being able to solve these problems would be greatly
> appreciated. Sometimes I also get an underflow error but not always.

Ah, well, your basic problem is that you are doing this all wrong. :-)
(I use one of Peter Mason's DLLs to ring a "bell" that plays a clip
of Curly of the Three Stooges yelling "No, no, no, you are doing it
all wrong!" We should play that clip now.) And the fact that it
actually worked in IDL 5.3 is probably not as shocking as you might
think.

Basically, what happens when you call the MAP_SET command is that
a data coordinate space (in latitude and longitude) gets created.
You obliterate that data space with your next CONTOUR command,
which sets up its *own* data space. That's why you can't get
any of the MAP_GRID or MAP_CONTINENT commands to work. They think
you are nuts. :-)

What you want to do is overplot (OVERPLOT keyword) your contour
information into the data space that is created by the MAP_SET
command. This will require that you set up X and Y (or more
properly, longitude and latitude) coordinates for your contour
command, but this is easily done. This will not change the MAP_SET
data space, and MAP_GRID and the other map commands will now
work property.

There are a number of articles on contour plots on my web page,
but I would start with this one for the basic ideas:

http://www.dfanning.com/tips/mapcontourdata.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Weird Runtime Problem
Next Topic: cnoidal functions

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

Current Time: Sun Oct 12 14:53:01 PDT 2025

Total time taken to generate the page: 1.60102 seconds