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

Home » Public Forums » archive » Re: 3-D & 2-D plots simultaniously
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
Re: 3-D & 2-D plots simultaniously [message #1283] Fri, 13 August 1993 15:25
landers is currently offline  landers
Messages: 45
Registered: May 1993
Member
In article <24e098$hrn@senator-bedfellow.MIT.EDU>,
jabarone@athena.mit.edu (John A Barone) writes:
|> Hi,
|>
|> I've been trying to plot a 3-D image and two 2-D images in
|> the same plot window. These images are the surface plotted from
|> arrays z, x, y and the 2-D plots of x vs z and y vs z. I do this
|> by first plotting the surface plot using the save keyword and then
|> excanging the axis and using plot with the T3D and NOERASE keywords
|> set for the other two plots.
|>
[ munched example and other stuff ... ]
|>


Try something more like this:

a = shift(dist(15), 5, 5)
a = exp(-(a/4)^2)

surface, a, /save, charsize = 2, title = "Surface"

; make the x and y coordinate arrays:

x = indgen(15) # replicate(1,15)
y = replicate(1,15) # indgen(15)

; a dummy array for the 'squashed' axis
dummy = replicate( 0., 225 )

plots, x, dummy, a, /t3d, psym = 2

plots, dummy, y, a, /t3d, psym = 4

; This will be just like what you want, except for one plot axis
; you may not really want it, but:

axis, !x.crange(0), !y.crange(0), !z.crange(0), /zaxis, /t3d

; Now the only other missing things are the two side plot titles, which
; you can add with xyouts....

xyouts, avg(!x.crange), !y.crange(0), z=!z.crange(1), 'Z vs X Plot', $
/t3d, text_axes=1, charsize=2, align=0.5

xyouts, !x.crange(0), avg(!y.crange), z=!z.crange(1), 'Z vs Y Plot', $
/t3d, text_axes=5, orient=-90, charsize=2, align=0.5

; Now if you want to put this on a partial page, just use !p.multi
; or !p.position to slide the things around....




DISCLAIMER: I use PV-WAVE, I don't know if you're using WAVE or IDL
(you didn't say). I don't know enough about the differences between
WAVE and IDL to know if all this will work. It works for me in WAVE.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Window Bug using Widgets
Next Topic: Re: Q: How to delete 'active' procedure?

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

Current Time: Wed Oct 08 11:29:06 PDT 2025

Total time taken to generate the page: 0.00570 seconds