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 
Switch to threaded view of this topic Create a new topic Submit Reply
contour plots on walls of a cube [message #17760] Thu, 11 November 1999 00:00 Go to next 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
----- ---- --- ---- --- --- --- --- -- -- -- - - - -
Re: contour plots on walls of a cube [message #17867 is a reply to message #17760] Fri, 12 November 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Eddie Haskell (haskell@see.signature.edu) writes:

> I have been delaying learning object graphics as I
> have spent the past several weeks learning object-oriented C++ and did
> not want to potentially confuse myself with two new language styles at
> the same time (seniscanisneofabricaphobia).

Thank *God* I finally have a name for it! I've been
going crazy for a month now, afraid to tell my
wife what's wrong with me and more afraid yet
to open that fat JAVA book. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: contour plots on walls of a cube [message #17868 is a reply to message #17760] Fri, 12 November 1999 00:00 Go to previous message
eddie haskell is currently offline  eddie haskell
Messages: 29
Registered: September 1998
Junior Member
David Fanning wrote:

> I think this has something to do with the axis rotation.
> Notice that it does *exactly* what you want if you set
> the AZ keyword on the Surface command to 0.

I had noticed that myself, which only added to my confusion.

Using /NOCLIP does fix the front corner problem (I should have known
that) and fixes the back wall MOST of the time. For some datasets it
fills the wall completely but for others it doesn't seem to make a
difference. Go figure.

> I'll bet it would work correctly if you put this into
> object graphics. :-)

I am sure it would. I have been delaying learning object graphics as I
have spent the past several weeks learning object-oriented C++ and did
not want to potentially confuse myself with two new language styles at
the same time (seniscanisneofabricaphobia). However, I suppose it's
time to bite the bullet and give it a whirl.

Thanks,
eddie

----- ---- --- --- ---- --- -- --- --- -- -- - - - -
|\ A G Edward Haskell
|\ Old Dominion University, Norfolk VA 23529
|\ Voice 757.683.4816 Fax 757.683.5550
|\ e-mail haskell*ccpo.odu.edu
----- ---- --- ---- --- --- --- --- -- -- -- - - - -
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 14:56:10 PDT 2025

Total time taken to generate the page: 0.00668 seconds