Re: Using OOB Colors with Filled Contour Plots [message #80044 is a reply to message #79977] |
Mon, 23 April 2012 15:22   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Matteo writes:
> thanks this is helpful! In the tutorial it might be beneficial to
> substitute:
> Levels=[Min(data),levels]
> with:
> Levels=[Min(data)-1,levels]
> or something like that. This way, the code works regardless of whether
> we have OOB values. In a situation where min(data) is the first level,
> a situation of the kind levels=[ 0.0, 0.0, ...] is created, which
> cannot be contoured.
>
> Am I right?
Well, I'm not sure. I almost always have Min(data) as
the first contour level, because I don't like the
background color "showing through" my contour plot.
And, which color "shows through" depends on whether
you are using the FILL or CELL_FILL keyword, which
also bothers me.
You have to be a little careful about subtracting
1 in a general case like this. It works with most
"reasonable" data, but always seems to fail when
you work with real-world data or are giving an
important demo of your software. Better to have
a firm theoretical understanding of why you are doing
what you are doing! ;-)
> (one of the "TVLCT" commands is also misspelled)
Humm. Thought I fixed that. Maybe I didn't upload the
fixed version. I'll check.
Thanks!
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|