[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Contour plots on maps
Simon de Vet wrote:
> David Fanning wrote:
> > There are several articles that you will really want to
> > read on my web page, but I would start with this one,
> > because you definitely have "holes" in your contour plots:
> I found this site, and already have incorporated the solution into my code.
> If I plot my filled contours without a map projection, it plots beautifully,
> with no holes or gaps.
> This is the problem: first, the lowest few contours are filled in. Then they
> are all overwritten in white, and the next are filled in. These are also
> whited out, and the last couple are plotted. Only the last ones are visible
> when the plotting is complete.
> I am outputting all my plots to postscript files, and not to the screen
> I have also tried changing the centre of the plot, as you mentioned, so that
> the data border corresponds to the plot border (Greenwhich on the edge,
> instead of the middle.) This eliminates the odd diagonal lines, but does
> nothing to the filled contour troubles.
> These problems occur for all map projection types, and never if map
> projection is turned off.
You should always use the /cell_fill keyword instead of /fill!!!!
Set this keyword to produce a filled contour plot using a "cell filling"
algorithm. Use this keyword instead of FILL when you are drawing filled
contours over a map, when you have missing data, or when contours that
extend off the edges of the contour plot. CELL_FILL is less efficient
than FILL because it makes one or more polygons for each data cell. It
also gives poor results when used with patterned (line) fills, because
each cell is assigned its own pattern. Otherwise, this keyword operates
identically to the FILL keyword, described below.
Tip - In order for CONTOUR to fill the contours properly when using a
map projection, the X and Y arrays (if supplied) must be arranged in
increasing order. This ensures that the polygons generated will be in
counterclockwise order, as required by the mapping graphics pipeline.
Warning - Do not draw filled contours over the poles on Cylindrical map
projections. In this case, the polar points map to lines on the map, and
the interpolation becomes ambiguous, causing errors in filling. One
possible work-around is to limit the latitudes to the range of -89.9
degrees to + 89.9 degrees, avoiding the poles.