[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
contour plots on walls of a cube
- Subject: contour plots on walls of a cube
- From: eddie haskell <haskell(at)see.signature.edu>
- Date: Thu, 11 Nov 1999 09:15:43 -0500
- Newsgroups: comp.lang.idl-pvwave
- Organization: Old Dominion Universityaruba
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:17226
Hello all,
I have what feels like a simple problem but I haven't been able to tweak
the right strings yet.
I have a 3-D data set and am trying to visualise it by placing contour
plots on the back three walls of a cube. The problem is that I can not
get one of the contour plots to properly fill the wall without manually
adjusting the position. In the example code that follows I always end
up with an empty space down the left side of the plot on the back left
wall. I can get it to fit by setting the x1 value in the contour call
to 0.18 by hand but that just doesn't seem IDL-correct and I would have
to manually determine new positions everytime I moved the cube on the
page.
Am I missing something obvious, is there a subtle trick that I either
haven't learned or have displaced from memory, or is there a completely
different way of doing what I want? Thanks for any and all suggestions.
Cheers,
eddie
(IDL 5.1 on Solaris and IDL 4.01 on Win95)
;-----------------------------------
dat = randomu(seed,11,11)
x1 = 0.2 ;position coordinates
x2 = 0.8
y1 = 0.2
y2 = 0.8
z1 = 0.0
z2 = 1.0
surface, dat, /nodat, xr=[0,10], yr=[0,10], zr=[0,10], $
xs=1, ys=1, zs=1, pos=[x1,y1,x2,y2,z1,z2], /save
plots,[x1,x2,x2],[y2,y2,y1],[z1,z1,z1],/nor,/t3d
;;;;;;back left This is the problem.
t3d,/yz
contour, dat, /fill, nlev=10, /noer, /t3d, zval=y2, xr=[0,10], $
yr=[0,10], xs=5, ys=5, pos=[x1,z1,x2,z2,z1,z2]
;-------------------------------------
;the following do fit properly for me, although I get the front
; corner cut out of the contour on the 'floor'
;;;;;;back right
t3d,/xz
contour, dat, /fill, nlev=10, /noer, /t3d, zval=x2, xr=[0,10], $
yr=[0,10], xs=5, ys=5, pos=[y1,z1,y2,z2,z1,z2]
;;;;;;floor
t3d,/xz
t3d,/yz
contour, dat, /fill, nlev=10, /noer, /t3d, zval=z1, xr=[0,10], $
yr=[0,10], xs=5, ys=5, pos=[x1,y1,x2,y2,z1,z2]
;-------------------------------------
----- ---- --- --- ---- --- -- --- --- -- -- - - - -
|\ A G Edward Haskell
|\ Center for Coastal Physical Oceanography
|\ Old Dominion University, Norfolk VA 23529
|\ Voice 757.683.4816 Fax 757.683.5550
|\ e-mail haskell*ccpo.odu.edu
----- ---- --- ---- --- --- --- --- -- -- -- - - - -