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

Home » Public Forums » archive » contour plots on walls of a cube
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
contour plots on walls of a cube [message #17760] Thu, 11 November 1999 00:00 Go to previous message
eddie haskell is currently offline  eddie haskell
Messages: 29
Registered: September 1998
Junior Member
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
----- ---- --- ---- --- --- --- --- -- -- -- - - - -
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: TRIANGULATE says "Points are co-linear, no solution"
Next Topic: !p.font

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

Current Time: Fri Oct 10 09:39:40 PDT 2025

Total time taken to generate the page: 2.31789 seconds