Re: contour filling [message #2044] |
Thu, 28 April 1994 03:44 |
swslandr
Messages: 1 Registered: April 1994
|
Junior Member |
|
|
Russell L Scott (russell@athena.mit.edu) wrote:
: I've been trying to make some filled contours over a mapped area.
: So, I first set up my map background by using MAP_SET and then using
: contour with /fill to get filled contours.
: The only problem is that often IDL does not fill the contours
: correctly especially near the border of the contoured area.
: I came across a warning in the help pages under CONTOUR. It says:
: Note that when used with a map projection estab-
: lished by MAP_SET, only closed contours that do not
: intersect window borders are filled.
: Does anyone have any ideas on how to solve this poor contouring problem??
Yes, give up on CONTOUR. I had the same problem and was told by our
resident IDL guru that the `official' IDL way of doing this is to:
turn your data into an image using BYTSCL or similar and then to use MAP_IMAGE
and TV to place it on your map. The following code seems to do the job:
img=bytscl(my_data)
map_set, ..<whatever>..
new_img=map_image(img, startx, starty)
tv, new_img, startx, starty
The variables startx and starty are *returned* by MAP_IMAGE and give the
position where the mapped data should go.
- Jason
--
/////////////// Jason Lander, Department of Meteorology, ////////////////
/////////////// University of Reading, READING. RG6 2AU. ////////////////
////// Tel: (0734) 875123 x7859 E-Mail: J.P.Lander@Reading.ac.uk ///////
|
|
|