axis return size

John W. Eaton jwe at octave.org
Thu Jul 9 14:24:48 CDT 2009


On  3-Jul-2009, David Woodburn wrote:

| I modified axis to only return 4 elements if the current figure is 2D:
| 
| function curr_axis = __axis__ (ca, ax, varargin)
| 
|   if (nargin == 1)
|     if (nargout == 0)
|       set (ca, "xlimmode", "auto", "ylimmode", "auto", "zlimmode", "auto");
|     else
|       xlim = get (ca, "xlim");
|       ylim = get (ca, "ylim");
|       [azimuth, elevation] = view();
|       if elevation == 90
|         curr_axis = [xlim, ylim];
|       else
|         zlim = get (ca, "zlim");
|         curr_axis = [xlim, ylim, zlim];
|       end
|     endif

I made a similar change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/7b74a7fd4761

In the future, please send context diffs rather than complete new
versions.  It is also best if you can send a Mercurial changeset,
since that will allow us to more easily apply the patch and credit you
for the change.

Thanks,

jwe


More information about the Bug-octave mailing list