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

Home » Public Forums » archive » Problem with axis scaling and position when plotting 3D data
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
Problem with axis scaling and position when plotting 3D data [message #81317] Fri, 07 September 2012 03:21
rafdedier is currently offline  rafdedier
Messages: 2
Registered: September 2012
Junior Member
Hi!

I am having a problem with the axis scaling and position using the AXIS and PLOTS procedure for plotting data in three dimensions.

I have written a test program that demonstrates the problem that is occurring:

PRO TESTPLOT3D

; Create the random data.

xdata = [0,2,2,0,0,2,2,0,2,0]
ydata = [0,0,1,1,0,0,1,1,0.5,0.5]
zdata = [0,0,0,0,2,2,2,2,3,3]

xrange = [0, 3]
yrange = [0, 1]
zrange = [0, 3]
anglex = 30
anglez = 30

WINDOW, XSIZE = 800, YSIZE = 800

; Set up the transformation matrix

scale3, xrange = xrange, yrange = yrange, zrange = zrange, $
ax = anglex, az = anglez

; Plot the data using plots
plots, xdata, ydata, zdata, /t3d, psym = 6, color = 255, symsize = 5

axis, xax = 0, /t3d, /data, xrange = xrange, CHARSIZE = 4, xtitle = 'X'
axis, yax = 0, /t3d, /data, yrange = yrange, CHARSIZE = 4, ytitle = 'Y'
axis, zax = 2, /t3d, /data, zrange = zrange, CHARSIZE = 4, ztitle = 'Z'


END

The file creates a set of x,y,z-datapoints and plots them in three dimensions using the SCALE3- and PLOTS-procedures. I want to add axes (using AXIS) onto the plot, but for some reason, the scaling and the position of the axes is incorrect for the x- and y-axis (and not for the z-axis), as the axes do not fully surround the datapoints. Some datapoints lie outside the axes??


Can you see them problem that is occurring?

Thank you in advance,
Kind regards,

Raf De Dier
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Parrallel Matrix Inversion in IDL?
Next Topic: Re: PLOT() function THICK keyword in v8.2 just a guideline?

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

Current Time: Wed Oct 08 11:44:07 PDT 2025

Total time taken to generate the page: 0.00574 seconds