RichardW (rmw092001@yahoo.com) writes:
> I need to make a 3-d SURFACE type plot, with the z axis twice the
> length of the x and y axes (sort of skyscraper shaped). This ought to
> be extremely simple??? -
>
> Ordinary surface plot, with x,y,z axes the same length:
>
> surface,dist(50),position=[.2,.2,.8,.8,.2,.8]
>
> Surface plot with a 'squashed' z axis:
>
> surface,dist(50),position=[.2,.2,.8,.8,.2,.4]
>
> Surface plot with a 'stretched' z axis:
>
> surface,dist(50),position=[.4,.4,.6,.6,.1,.9]
>
> The 'squashed' z axis works fine, but IDL doesn't allow the last
> example? - or maybe I haven't understood how POSITION keyword works in
> 3 dimensions???
This problem is complicated by the fact that the IDL
Surface command is not a true 3D representation. It's
more of a 2.5D representation, in that it doesn't allow
for independent rotation of the three orthogonal axes.
In fact, the Z axis must always be vertical in the plot.
I think this is what throws the positioning in the Z
direction totally out of whack.
This is quite easily done, however, in object graphics.
So, this morning, I hacked up my FSC_Surface program
to accept a POSITION keyword to do what you want to do.
I changed the order of the coordinates, however, to more
easily accommodate either a 2, 4, or 6-elements vector
of positions. The order is like this:
Position = [x0, x1, y0, y1, z0, z1]
So, to get your stretched plot, you would type this:
IDL> FSC_Surface, dist(50), Position=[.4, .6, .4, .6, .1, .9]
You can download FSC_Surface here:
http://www.dfanning.com/programs/fsc_surface.pro
You will need a couple of other programs from the Coyote
Library as well. Read the documentation header to find
out which ones.
By the way, while I was hacking around, I decided to
add the ability to zoom into and out of the surface
plot. You can accomplish this with the RIGHT and MIDDLE
buttons, respectively.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|