comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » shading in contour plots
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: shading in contour plots [message #44747 is a reply to message #44648] Sun, 10 July 2005 03:02 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
C. Hoyle writes:

> Is it possible to create an accurate, filled contour plot with data
> which does not vary smoothly?

Depends entirely on the definition of "accurate", I suppose.
But if you are new to IDL, it's not likely. :-)

> Im trying to create a contour plot of trend data. I would like to add
> some shading in a single colour to indicate where the trends are
> significant, i.e. I have a 2-d array filled with 1s and 0s, and call
> contour with this array and the /cell_fill keyword. If I use
> levels=[1], I get a plot composed of large rectangular patches, even
> though the data is rather finely gridded, and the significance is not
> distributed in large rectangular areas. If I change the levels to
> levels=[0.1,1.], the plot looks completely different (much larger
> shaded areas), despite the fact that there are only ones and zeros in
> the array I'm plotting. Anyone got an idea of what Im doing wrong
> here?

I suspect just about everything, but this probably has more to do
with IDL and its documentation than it does with you. If you are
serious about filled contour plots, you might want to read these
articles:

http://www.dfanning.com/tips/contour_hole.html
http://www.dfanning.com/tips/contour_fill.html
http://www.dfanning.com/tips/nlevels.html
http://www.dfanning.com/color_tips/fill_colors.html

I suspect you *might* be able to get things to work, however,
if you tried setting your levels value to something like this:

levels = [0.0, 0.5]

Depending upon how small your array actually is, this will
probably give you some resemblance to what you are expecting
to see.

Cheers,

David

P.S. If you are still struggling, tell us something about
the size of the array you are contouring and let us see
the contour code you are using.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: validating user input
Next Topic: Re: BAR_PLOT restricted to 60 element ARRAY??

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Tue Dec 02 04:58:29 PST 2025

Total time taken to generate the page: 0.63790 seconds