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

Home » Public Forums » archive » Re: SCALE3.pro isn't doing it's job
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: SCALE3.pro isn't doing it's job [message #67486] Thu, 30 July 2009 19:12 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
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.")
[Message index]
 
Read Message
Read Message
Previous Topic: Re: enviconvert_file_coordinates
Next Topic: pixel value to x and y position

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

Current Time: Thu Oct 09 23:30:51 PDT 2025

Total time taken to generate the page: 0.08135 seconds