Menu

Problem with axis()?

Help
Ben Abbott
2007-07-05
2013-04-25
  • Ben Abbott

    Ben Abbott - 2007-07-05

    I think I came across a problem with axis(). The version accompanying octplot contains the code

    ----------------------------
    function _ax = axis (varargin)
      _gca=gca();

      ax=zeros(1,4);
      ax(1:2)=get(_gca,"xlim");
      ax(3:4)=get(_gca,"ylim");

      for ii=1:length(varargin)
        __axis_helper__(_gca,ax,varargin{ii});
      endfor

      ax=zeros(1,4);
      ax(1:2)=get(_gca,"xlim");
      ax(3:4)=get(_gca,"ylim");

    endfunction
    ----------------------------

    The output variable is apparently not set. When I add "_ax = ax;" as shown below

    ----------------------------
    function _ax = axis (varargin)
      _gca=gca();

      ax=zeros(1,4);
      ax(1:2)=get(_gca,"xlim");
      ax(3:4)=get(_gca,"ylim");

      for ii=1:length(varargin)
        __axis_helper__(_gca,ax,varargin{ii});
      endfor

      ax=zeros(1,4);
      ax(1:2)=get(_gca,"xlim");
      ax(3:4)=get(_gca,"ylim");

      _ax = ax;

    endfunction
    ----------------------------

    Now it appears to work. However, I've not considered whether this the appropriate for all instances.

     
    • Shai Ayal

      Shai Ayal - 2007-07-05

      Ben,

      Thank you for your help in making octplot work in OSX

      If you think you found a bug (and you have found one) please report it in the bug tracker. This allows for tracking the bug's status, and allows me to see which bugs are open before I release.

      Specifically the bug you mentioned above has already been reported and fixed -- something you would have seen in the bug tracker -- bug #1722473
      http://sourceforge.net/tracker/index.php?func=detail&aid=1722473&group_id=86268&atid=579014

      Thanks again,
      Shai

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.