NLEVELS doesn't necessarily mean NLEVELS [message #14928] |
Mon, 12 April 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Hi Folks,
In playing around with filled contours for a couple of new
articles I put up on my web page recently I encountered
an interesting problem. I took a simple data set from the
LoadData program you can find on my web page:
peak = LoadData(1)
Then I did this:
Contour, peak, NLevels=12
But what I noticed was that IDL was actually drawing only
9 contour levels, not 12. Humm.
I contacted RSI technical support and learned that contrary
to what the IDL documentation claims, the NLEVELS keyword
does not divide the data range into "this number of equally
spaced contour intervals". Rather, this is taken as a
(I'm not kidding) "suggestion" to the CONTOUR command, and
the CONTOUR command can apparently do what it likes with the
suggestion. Including, as I understand it, put it where the
sun don't shine.
I'm told by technical support that if I really want 12 contour
levels I can either calculate them myself (yes, I knew this,
which is the *point* of my two articles) or I could increase
the number of levels with the NLEVELS keyword. He didn't have
a suggestion as to what I should increase the number *to* in
order to get 12 levels, but presumably a number between 12 and
20 would do it. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: NLEVELS doesn't necessarily mean NLEVELS [message #14986 is a reply to message #14928] |
Wed, 14 April 1999 00:00  |
Struan Gray
Messages: 178 Registered: December 1995
|
Senior Member |
|
|
David Fanning, davidf@dfanning.com writes:
> I contacted RSI technical support and learned that contrary
> to what the IDL documentation claims, the NLEVELS keyword
> does not divide the data range into "this number of equally
> spaced contour intervals". Rather, this is taken as a
> (I'm not kidding) "suggestion" to the CONTOUR command, and
> the CONTOUR command can apparently do what it likes with the
> suggestion. Including, as I understand it, put it where the
> sun don't shine.
When you're tired of this one, try playing with the BINSIZE keyword
in calls to HISTOGRAM and see if you can predict how many bins your
histogram will have. I never could.
Struan
|
|
|
|