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

Home » Public Forums » archive » Re: stippling or cross hatching in contour plot
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: stippling or cross hatching in contour plot [message #56281 is a reply to message #56148] Mon, 08 October 2007 08:44 Go to previous message
MA is currently offline  MA
Messages: 15
Registered: August 2005
Junior Member
Hello David,
thanks for your comments. Here's a very short piece of code to
illustrate my problem.

;; create some data
array=FindGen(100)
array=Reform(array,10,10)

Window,2
loadct,2
;; contour data with color
contour,array,levels=indgen(100),c_colors=indgen(100)+1,/fil l
;; try to put hatching on top
contour, array,levels=[0,15,25],c_orientation=[45,-45,0],/fill,/
noerase
end

> As usual with IDL contours, you can't let IDL choose the contours
> for you. You have to choose them yourself, and the lowest one better
> be conincident with the MIN(data) if you expect to make sense of
> what you are doing. :-)
I've done that


> I don't see how it can erase the colors underneath, unless
> you forget to use the NOERASE keyword.
You were right, I forgot the NOERASE

Still, the problem remains that c_orientation will apply its hatching
to all levels above the ones specified. Run the code above and see
what I mean. All levels above 0 are hatched at 45deg angle, all levels
above 15 are hatched at 45 AND -45 deg angle, and all levels above 25
are hatched at 45, -45 and 0deg angle. If I specify only one value for
c_orientation=45, then the whole plot ends up being hatched at 45deg.
I can't figure out how to hatch only between 0 and 15, or 15 and 25,
for example.

I've tried using POLYFILL instead, with the pattern keyword, and
defining the pattern as a solid color for points where I don't want
stippling, and defining the pattern as solid color with a couple of
black dots where I do want stippling. It works, but the plot ends up
being made up of lots of little squares, which doesn't look as smooth
as the contour plot.

I hope this explanation is a little clearer.
Thanks!
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Recognizing double precision?
Next Topic: Sharing program

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

Current Time: Fri Oct 10 17:53:21 PDT 2025

Total time taken to generate the page: 0.87895 seconds