Filled Contour Colors on Maps Incorrect [message #26816] |
Tue, 25 September 2001 20:00 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I have a feeling you map guys are not going to like this
post. :-(
Here is a filled-contour-on-a-map-projection problem
that has been giving me nightmares.
I wish to put a filled contour plot on a cylindrical
map projection. I've read all the articles on that
Coyote site about filled contours and I am aware of
all the pitfalls. I have created my own contour intervals,
and I know exactly which colors I am using for my
filled contours.
I follow the recommended procedure. I create a map
projection with Map_Set. I add the filled contour
command by specifying the data and the vectors of
latitude and longitude and I use the Contour command
with the OVERPLOT keyword set. But...
The colors are not right. I know this for two reasons.
First, I have used exactly the same data set with the
GrADS software and produced a contour plot that has the
same contour intervals, but is colored differently.
Second, I have confirmed that the data is identical
in both the GrADS and IDL programs.
If you are interested in seeing the output, you can find
it here:
http://www.dfanning.com/test/contour_fill_bug.html
You can also download from this page an IDL save file
containing the data and an IDL main-program that will create
the plots for you.
To confirm that something screwy is going on, I have
created filled contour plots in two different ways.
(This data is also shown on the link above.) First, I
have created a filled contour plot without a map projection.
In other words, instead of overplotting the contour plot on
a map projection, I have just created a contour plot.
The contours are identical (as I expect since the data
is identical), but the colors are different and are what I
expected from the GrADS plot.
Second, to confirm that it is overplotting on a map
projection that is the problem, I create a filled
contour plot by first drawing a contour plot with
no data and then overplotting the filled contours.
Again, the data colors are identical to both the GrADS
plot and to the normal contour plot.
So, what gives with map projections?
It appears to me that filled contour plots fill
in colors from one level to another differently
on map projections than they do normally. Has
anyone seen this before? Note that my data
runs from -2.0 to 1.75 and that it appears the
data about the 0.0 level is the one that is
especially screwy.
I'm running IDL 5.4 on Windows 2000.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|