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 #56278 is a reply to message #56149] Mon, 08 October 2007 09:47 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Whoops! Sorry. trying to do too many things at once.

Try this code.

;; 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=indgen(5),/overplot, $
c_orientation=[30,45,-30,-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], levels=indgen(5)
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: Wed Oct 08 18:08:04 PDT 2025

Total time taken to generate the page: 0.00482 seconds