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

Home » Public Forums » archive » Filled Contour Plotting
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
Filled Contour Plotting [message #3506] Tue, 07 February 1995 09:44 Go to next message
cavanaug is currently offline  cavanaug
Messages: 18
Registered: December 1994
Junior Member
The IDL V3.6 Reference Guide says about the CONTOUR routine (on page 1-49) :

"Contours that are not closed can not be filled because their interior and
exterior are undefined. Contours created from data sets with missing data
may be closed; many map projections can also produce contours that are not
closed. Filled contours should not be used in these cases."

And, of course, I would like to make a filled contour plot, using a data
set with missing data and overplotting the contour plot onto different map
projections. Has anyone found a way to do this? What about the CLOSED
keyword? I found a routine called POLYCONTOUR, but the documentation says
that this routine is obsolete.

Any help would be greatly appreciated.

Charles

--
Charles Cavanaugh "Words are very unnecessary, they can only do harm"
cavanaug@ncar.ucar.edu - Depeche Mode
NCAR Boulder, CO, USA "Facts all come with points of view"
My opinions - Talking Heads
Re: Filled Contour Plotting [message #3629 is a reply to message #3506] Thu, 09 February 1995 18:30 Go to previous message
msg5332 is currently offline  msg5332
Messages: 1
Registered: February 1995
Junior Member
In article <3h8bhk$akq@ncar.ucar.edu>, cavanaug@uars1.acd.ucar.edu (Charles
Cavanaugh) wrote:

>
> The IDL V3.6 Reference Guide says about the CONTOUR routine (on page 1-49) :
>
> "Contours that are not closed can not be filled because their interior and
> exterior are undefined. Contours created from data sets with missing data
> may be closed; many map projections can also produce contours that are not
> closed. Filled contours should not be used in these cases."
>
> And, of course, I would like to make a filled contour plot, using a data
> set with missing data and overplotting the contour plot onto different map
> projections. Has anyone found a way to do this? What about the CLOSED
> keyword? I found a routine called POLYCONTOUR, but the documentation says
> that this routine is obsolete.
>
> Any help would be greatly appreciated.
>
> Charles
>
> --
> Charles Cavanaugh "Words are very unnecessary, they can only do harm"
> cavanaug@ncar.ucar.edu - Depeche Mode
> NCAR Boulder, CO, USA "Facts all come with points of view"
> My opinions - Talking Heads


The /CLOSED keyword seems to work fine and is a nice improvement over the
older
version of IDL. Just use that and you should be able to fill the open
contours which intersect the sides of your map domain.

The IDL contour routine provides a solid color fill or line-pattern fill
which works well if you don't mind the way it looks. The line fill pattern
works with most if not all of the output devices (like postscript, etc).

POLYCONTOUR seems to still work and is necessary if you want to define your
own specific pattern to fill with. The pattern must be 3-d array with 2 or
more defined patterns. If you use want to define your own patterns using
polyfill, you must first save the contours to a file with the
PATH_FILENAME="your.file" in the contour call. Then call polycontour. For
example...
;------
contour, fldplt, xpositions, ypositions, LEVELS = lvls, $
PATH_FILENAME = 'contours.dat', /CLOSED

pat = bytarr(4,4,2) ; here we have defined only 2 patterns

pat(0,*,0) = [0, 0, 255, 0]
pat(1,*,0) = [0, 255,255,255]
pat(2,*,0) = [0, 0, 255, 0]
pat(3,*,0) = [0, 0, 0, 0]

pat(0,*,1) = [0, 255, 0, 255]
pat(1,*,1) = [0, 0, 255, 0]
pat(2,*,1) = [0, 255, 0, 255]
pat(3,*,1) = [0, 0, 0, 0]

POLYCONTOUR, "contours.dat", /DELETE_FILE, PATTERN = pat
;------

The only problem with defining your own patterns is that they won't be
printed correctly if you use postscript. One way around this is to plot to
the Z-buffer and then TVrd the Z-buffer and save the image to postscript.
I think the HP device has some built-in patterns but I haven't tried that
yet. Does anyone else have solutions to the printing problem?


- Matt Gilmore
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Windows NT version of IDL
Next Topic: IDL Win32

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

Current Time: Wed Oct 08 19:39:15 PDT 2025

Total time taken to generate the page: 0.00469 seconds