help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "axis scale / dataspectratio" - problem with 3D-graph


From: pathematica
Subject: Re: "axis scale / dataspectratio" - problem with 3D-graph
Date: Fri, 6 May 2011 13:07:11 -0700 (PDT)

Hello Clara


C.B. wrote:
> 
> Do you mean that the y and z axis goes from -8000 to 8000 and the x-axis
> from 0 to 16000?
> Tried this, but then there is a missing section on the negative side of
> the y-axis.  It's not "fully" half.
> 

The problem you have noted is related to notes 2 and 6 in my post above. 
Presumably, the plotting routine considers one of the lines of longitude
(the one which is missing) just the wrong side of the bounding plane whereas
it considers the other within the active region to be plotted. 
In my original post, I added a small number (a small multiple of eps) to the
relevant end of the relevant axis to avoid this problem. It is possible to
achieve the same thing for the scales at which you are working by specifying
the x axis as -1 to 16000.

So, the following works (note the xlo and xhi)

octave-3.2.3:1> clf;
octave-3.2.3:2> axis([-1 16000 -8000 8000 -8000 8000], 'square');
octave-3.2.3:3> hold on;
octave-3.2.3:4> [x y z]= ellipsoid(xc, yc, zc, xr, yr, zr, n);
octave-3.2.3:5> mesh(x, y, z);
octave-3.2.3:6> set (gca(), 'position', [0.13 -0.05 0.775
1.08]);octave-3.2.3:35> plot3 ([0 0], [0 0], [-8000 8000], 'color', 'r',
'linewidth', 2);
octave-3.2.3:7> plot3 ([0 0], [-8000 8000], [0 0], 'color', 'r',
'linewidth', 2);
octave-3.2.3:8> plot3 ([0 16000], [0 0], [0 0], 'color', 'r', 'linewidth',
2);
octave-3.2.3:9> box off;


--
View this message in context: 
http://octave.1599824.n4.nabble.com/axis-scale-dataspectratio-problem-with-3D-graph-tp3491951p3504150.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]