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

Home » Public Forums » archive » RE: colour-filling contours over maps
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
RE: colour-filling contours over maps [message #7206] Sun, 20 October 1996 00:00
davidf is currently offline  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
Re: colour-filling contours over maps [message #7219 is a reply to message #7206] Thu, 17 October 1996 00:00 Go to previous message
Andy Loughe is currently offline  Andy Loughe
Messages: 174
Registered: November 1995
Senior Member
On 17 Oct 1996, Morwenna Griffiths wrote:

> I'm guessing this is an FAQ, but I couldn't find an faq posting - maybe
> our news reader doesn't keep old enough news?
>
> Is there a way of filling contours which have been plotted over a map?

The best way I know of is the following...
map_set, 0, 180
contour, dist(46), indgen(46)*8, indgen(46)*4-90, /cell_fill, /over
map_continents
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Arrggghhh...(app-defaults)
Next Topic: RE: passing string parameter

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

Current Time: Wed Oct 08 15:37:04 PDT 2025

Total time taken to generate the page: 0.00680 seconds