RE: colour-filling contours over maps [message #7206] |
Sun, 20 October 1996 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Morwenna Griffiths <morwenna@squall.maths.monash.edu.au> writes:
> Is there a way of filling contours which have been plotted over a map?
> I feel I should be able to do it by setting the edge values to zero
> (or something) that will close them and then all should be fine, but I don't
> seem able to do it - should I persevere? or is there a cleverer way?
If it is really necessary to close the open or edge contours (see below)
then you can do it by putting the data array into a slightly larger
array whose edge values are set to the minimum data value. Suppose
your data was in an array with the variable name "ozone". Your code might
look something like this:
s = SIZE(ozone)
closedArray = REPLICATE(MIN(ozone), s(1)+2, s(2)+2)
closedArray(1,1) = ozone
> These contours are open at each side of the map rather than just like a
> semi-circle with one open edge, does this make a difference?
Sometimes. Have you tried using the CELL_FILL keyword with your CONTOUR
command? This keyword is similar to the FILL keyword, but is used expressly
for open contours.
Another alternative is to put your contour plot on top of an image of the
data. You can easily get the effect of filled contour plots, just by
manipulating your color table. Your code will look something like this:
MAP_SET, 40, -100, /ORTHOGRAPHIC
TV, MAP_IMAGE(ozone, xx, yy, /BILINEAR), xx, yy
CONTOUR, ozone, lon, lat, NLEVELS=12, /OVERPLOT, /FOLLOW
MAP_SET, 40, -100, /ORTHOGRAPHIC, /GRID, /CONTINENT, /NOERASE
Perhaps this gives you some ideas.
Yours,
David
--
David Fanning, Ph.D.
Phone: 970-221-0438
Fax: 970-221-4728
E-Mail: davidf@fortnet.org
|
|
|