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

Home » Public Forums » archive » Contour
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: contour [message #10066 is a reply to message #8458] Fri, 03 October 1997 00:00 Go to previous messageGo to previous message
hcp is currently offline  hcp
Messages: 41
Registered: August 1995
Member
|> R. Bauer wrote:
|> > Who can explain me the cell_fill flag by contour.
[and Martin Schultz replied]
|> cell_fill splits the area to be filled into a number of smaller
|> cells (I think they are rectangles) instead of using some sophisticated
|> fill algorithm that uses the outline (contourline) of the area to be
|> filled. There are occasions when the standard fill produces very weird
|> results (I encountered these, but forgot how I made it), in these cases
|> cell_fill will be much more robust. It may be a good idea to try out
|> both algorithms (with and without cell_fill) if you have contour plots
|> with a lot of variety, many gaps in the data or other somewhat ill-posed
|> problems.

Also, be warned that in IDL 5.0 the cell_fill keyword does the same
as the fill keyword.

In IDL 5.0.2 /cell_fill is back but has bugs which occur on
map projections (one of the main places where you need cell_fill in
the first place). RSI are aware
of this. The workaround they suggest is to use this short program as
a wrapper around contour.

; ************************************************************ **
PRO CONTOUR_CELL, z, x, y, _EXTRA=e
; This program was supplied by RSI as a fix for the bigs in the
; cell_fill algorithm of the contour
; routine. contour_cell,data,xgrid,ygrid,/cell_fill will work where
; contour ,data,xgrid,ygrid,/cell_fill will not

nx = n_elements(x) ;Divide a rectangular grid into
;triangles
ny = n_elements(y)
tr = lonarr(6, nx-1, ny-1, /NOZERO)
for iy=0, ny-2 do for ix=0,nx-2 do $ ;Make the triangles
tr(0, ix, iy) = [0, 1, nx+1, 0, nx+1, nx] + (ix + iy*nx)
;2/cell
CONTOUR, z, x # replicate(1,ny), replicate(1,nx) # y, $
TRIANGULATION=tr, _EXTRA=e
end
; ************************************************************ **

Hugh

--

============================================================ ==============
Hugh C. Pumphrey | Telephone 0131-650-6026
Department of Meteorology | FAX 0131-662-4269
The University of Edinburgh | Replace 0131 with +44-131 if outside U.K.
EDINBURGH EH9 3JZ, Scotland | Email hcp@met.ed.ac.uk
OBDisclaimer: The views expressed herein are mine, not those of UofE.
============================================================ ==============
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Problems reading HDF after 5.2 upgrade
Next Topic: Numerical Recipes in IDL

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

Current Time: Sat Oct 11 03:21:42 PDT 2025

Total time taken to generate the page: 1.67962 seconds