comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: colour-filling contours over maps
items: RE: colour-filling contours over maps

Re: colour-filling contours over maps
type: item
description: 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
creator: Andy Loughe
date: 1996-10-17T07:00:00-00:00

RE: colour-filling contours over maps
type: item
description: 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
creator: davidf
date: 1996-10-20T07:00:00-00:00