[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #44096] plotboxaspectratio wrong value for "ax
From: |
Avinoam Kalma |
Subject: |
[Octave-bug-tracker] [bug #44096] plotboxaspectratio wrong value for "axis equal" |
Date: |
Tue, 27 Jan 2015 21:56:57 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.99 Safari/537.36 |
Follow-up Comment #2, bug #44096 (project octave):
You are right.
Using Matlab R2010a, I get
plot (1:10)
axis equal
get (gca,'plotboxaspectratio')
520.8000 410.7600 91.2800
which is not [3 4 4], neither [5 4 4].
Debugging Matlab code, shows in axis.m that plotboxaspectratio is computed in
the following way:
dx = diff(get(gca,'xlim'));
dy = diff(get(gca,'ylim'));
dz = diff(get(gca,'zlim'));
set(gca,'Units','Pixels');
a = get (gca,'position');
b = [a(3) a(4) dz*min(a(3),a(4))/min(dx,dy)]
b =
520.8000 410.7600 91.2800
and plotboxaspectratio is set bo b.
If you run this in octave you will get a different answer:
b =
434.000 342.300 34.230
because dx,dy,dz are different.
What do you recommend to do now?
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44096>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/