Scatter plot in 3 dimensions [message #1342] |
Mon, 30 August 1993 14:38 |
ryba
Messages: 33 Registered: October 1992
|
Member |
|
|
Hi, I'm having a bit of difficulty getting a reasonable scatter plot of
3-d points using IDL 3.0.0 under SunOS 4.1.3 and OpenWindows. I have 2
structures, N and O each containing (double) fields called X,Y,and Z, and
I'd like to scatter plot their differences. Here's the code I'm using:
xmin=min(n.x-o.x,max=xmax)
ymin=min(n.y-o.y,max=ymax)
zmin=min(n.z-o.z,max=zmax)
scale3,xrang=[xmin,xmax],yrang=[ymin,ymax],zrang=[zmin,zmax]
axis,xmin,ymin,zmin,xax=0,/t3d,xrange=[xmin,xmax]
axis,xmin,ymin,zmin,yax=0,/t3d,yrange=[ymin,ymax]
axis,xmin,ymin,zmin,zax=2,/t3d,zrange=[zmin,zmax]
plots,n.x-o.x,n.y-o.y,n.z-o.z,/t3d,psym=3
My problem is the axes aren't being drawn properly - they appear as a
small blob at the origin. It may be a function of the data, since I remember
commands like these working once. Is there some piece of the AXIS call
that I'm missing? I'd also appreciate any canned routines since the blurb
here doesn't do range rounding.
--
Dr. Marty Ryba | Generation X:
MIT Lincoln Laboratory | Too young to be cynical,
ryba@ll.mit.edu | too old to be optimistic.
Of course nothing I say here is official policy!!!!
|
|
|