Re: Contour Colors on Maps [message #70428] |
Thu, 15 April 2010 16:04 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I just spent a couple of hours puzzling over the colors of
> a filled contour plot on top of a map projection. I could
> have spent the time more profitably by reading some of the
> contouring articles on my web page. :-(
>
> Let me just give you the bottom line, before you go out
> and publish those beautiful pictures. If you are putting
> filled contours on *map projections* use the CELL_FILL and
> not the FILL keyword. If you don't, your colors will
> surely lead to eventual embarrassment.
>
> http://www.dfanning.com/color_tips/fill_colors.html
Incidentally, I don't know *how* IDL knew I was doing
a map projection. The plot coordinates were set up
by specifying a Plot command with an X and Y range.
(I was using the XY projected grid coordinates of a
map projection, but that really seems beside the point.)
In the Contour command itself, I had the data array,
and an X and Y array of the same size, with the projected
grid X and Y coordinates. This is really no different
from any other IDL Contour command.
Plot, nonsenseData, /NoData, $
XRange=[-3500000, 3500000], $
YRange=[-5540000, 5540000]
Contour, data, x, y, /CELL_FILL, /OVERPLOT
Does that look anything like a map projection to you?
Still, the FILL keyword gave the wrong colors, and the
CELL_FILL keyword gave the right ones. Maybe IDL *smelled*
the map projection off in the distance. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thue. ("Perhaps thos speakest truth.")
|
|
|