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

Home » Public Forums » archive » 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 #56279 is a reply to message #56149] Mon, 08 October 2007 09:28 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MA writes:

> 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.

Humm. You may be right. OK, we have to be more creative. :-)

I didn't understand your example, but here is another
that demonstrates how to get cross-hatching on top of
colors. The cross-hatching appears to me to be exactly
where I expect it to be.

Cheers,

David

;*********************************************************** **********
;; create some data
array=dist(10,10)

Window,2
loadct,2
;; contour data with color
loadct, 33, ncolors=5, bottom=1
device, decomposed=0, get_decomposed=theState

thisDevice = !D.Name
xsize = !D.X_Size
ysize = !D.Y_Size
Set_Plot, 'Z'
Device, Set_Resolution=[xsize,ysize], Z_Buffer=0
contour,array,levels=indgen(5),c_colors=indgen(5)+1,/fill, $
xstyle=1, ystyle=1, position=[0.1, 0.1, 0.9, 0.9]
;; try to put hatching on top
locx = [0.1, 0.9] * xsize
locy = [0.1, 0.9] * ysize
snap1 = TVRD(locx[0], locy[0], locx[1]-locx[0]+1,
locy[1]-locy[0]+1)

contour, array,levels=[0,2.5,5.0],/overplot, $
c_orientation=[45,-45,0]
snap2 = TVRD(locx[0], locy[0], locx[1]-locx[0]+1, $
locy[1]-locy[0]+1)

Set_Plot, thisDevice
contour,array, xstyle=1, ystyle=1, /NoData, $
position=[0.1, 0.1, 0.9, 0.9],
TV, snap1 > snap2, locx[0], locy[0]
device, decomposed=theState
end
;*********************************************************** ***

--
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
Read Message
Previous Topic: Wanted: 4D multi-variate Data w/ u,v,w & t.
Next Topic: Re: moving to objects / IDL objects and object graphics

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

Current Time: Sat Oct 11 21:29:12 PDT 2025

Total time taken to generate the page: 0.24180 seconds