Yet another problem with CONTOUR? [message #2126] |
Thu, 26 May 1994 13:54 |
scott
Messages: 17 Registered: January 1994
|
Junior Member |
|
|
I have a recurring problem doing black-and-white shaded contour plots in
IDL on an HP735.
Many of the fields I am plotting have missing data, which I code as 1.e36
and use the MAX_VALUE keyword to CONTOUR to avoid contouring through these
missing data regions.
Everything is just fine until I try to shade above or below a given
threshold contour line using the /FILL keyword. Under certain conditions
(seems to be when the edge of a shaded region is cut by an area of missing
data), I get the error
CONTOUR: No valid points, must have at least 2 distinct points.
I have checked by using WHERE to make sure there are indeed points that
fall in the shaded region. This is not the problem.
It would be no big deal to just have CONTOUR refuse to shade such regions,
and maybe print a warning to the terminal. Unfortunately, this is a
bona-fide error, and causes my entire program to crash. In most cases it
is nearly impossible to decide in advance if a given combination of data
and shading thresholds will produce the crash, so I often lose a lot of
work by having my whole App crash in this way.
Can anybody help with this problem? I would be satisfied with a way to
trap the error, even if i could not produce the shaded plot, since I could
then just select a different shading threshold without losing all my work.
Thanks for any suggestions.
--
A. Scott Denning (303)491-8346
<scott@abyss.atmos.colostate.edu>
Dept. of Atmospheric Science
Colorado State University
Fort Collins, CO 80523
|
|
|