Brian Daniel writes:
> I'm using the SCALE3 procedure to initialize the !P.T variable for a
> 3D scatter plot with the following commands:
>
> xRange = [min(rot_image[0,*]),max(rot_image[0,*])]
> yRange = [min(rot_image[1,*]),max(rot_image[1,*])]
> zRange = [min(rot_image[2,*]),max(rot_image[2,*])]
> print,'X Range:',xRange
> print,'Y Range:',yRange
> print,'Z Range:',zRange
> Scale3,XRange=xRange,$
> YRange=yRange,$
> ZRange=zRange,$
> Ax=45, Az=80
>
> The problem is when I plot the axes using the "AXIS" command, they
> plot as if their range is zero (little stubby nubs of an axis).
The "default" range for the AXIS command is 0 to 1. The
AXIS command is not going to get its values from the
transformation information set up by Scale3, although
it will get its position from there (assuming you use
the T3D keyword when you call it). See this article
for how to build a 3D scatterplot:
http://www.dfanning.com/tip_examples/scatter3d.pro
You will have to set the [XYZ]Range keywords on your AXIS
commands to get the right range for the axes. Here I use
the SURFACE command to set up the transformation matrix,
but I could have used SCALE3:
SURFACE, DIST(5), /NODATA, /SAVE, XRANGE=[0,100], $
YRANGE=[-50,50], ZRANGE=[0, max(z)], XSTYLE=1, $
YSTYLE=1, ZSTYLE=1, CHARSIZE=1.5, $
POSITION=[0.1, 0.1, 0.95, 0.95, 0.1, 0.95], $
XTICKLEN=1, YTICKLEN=1, XGRIDSTYLE=1, YGRIDSTYLE=1
AXIS, XAXIS=1, /T3D, CHARSIZE=1.5, XRANGE=[0,100]
AXIS, YAXIS=1, /T3D, CHARSIZE=1.5, YRANGE=[-50,50]
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|