octave-maintainers
[Top][All Lists]
Advanced

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

Re: axis square


From: Marco Caliari
Subject: Re: axis square
Date: Mon, 09 Mar 2009 15:31:06 +0100 (CET)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Mar 9, 2009, at 5:56 PM, Marco Caliari wrote:

Dear maintainers,

the enclosed patch (against 3.1.54) makes "axis square" to behave in a compatible way and as described in the documentation. I also modified the demo, since "axis normal", "axis square", "axis equal" should appear after a plot command in order to take effect (this is also a compatible behaviour). Please consider to apply this patch.

Best regards,

Marco<axis.m.patch>

Marco,

If I understand correctly, the "square" and "equal" options need to be switched.

Dear Ben,

I don't think so. If you use "axis square" it means you want the plot in a square box.

If you modify the demos so that the "plot(...)" commands precede the "axes(...)" and "title(...)" commands the problem should be clear.

Also, it appears to me that the "dataaspectratio" for "equal" ("square" in your diff) should be set as ...

  elseif  (strcmp (ax, "equal"))
    x = xlim;
    y = ylim;
    set (ca, "dataaspectratio", [(x(2)-x(1)), (y(2)-y(1)), 1]);

I modified into

   elseif  (strcmp (ax, "square"))
     x = xlim;
     y = ylim;
     set (ca, "dataaspectratio", [(y(2)-y(1)), (x(2)-x(1)), 1]);


Marco

Attachment: axis.m.patch
Description: Text Data


reply via email to

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