Re: NAN in contour [message #35517 is a reply to message #35419] |
Mon, 16 June 2003 07:29  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Tomson writes:
> I use the contour and contourbar like David wrote on his web. I have a
> question, for example,
> contour, z,x,y
> there are some NAN in z, I want the figure at such position to fill with
> black point. How to do that? Now at such position, the figure is white
> blank.
It is hard to tell, with the detail you have given,
exactly what you are trying to do here, but it sounds
like a filled contour plot of data that has NANs in it.
I think the white blank space is actually coming about
from *not* setting the NAN keyword on the MIN and MAX
functions that are used to calculate the contour
intervals. (At least if you are using the code on
my web page.)
If you were doing this correctly the NAN values would
assume the same color as the surrounding pixels that
were good values, and you should see broken contour
lines on your plot, etc. In other words, the NANs
should just be ignored.
I don't think there is an easy way to set these
values to a specific color. And no way to set them
to a specific color that doesn't look artificial and
clunky.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
|
|
|