Mercurial > hg > octave-lyh
diff scripts/plot/private/__axes_limits__.m @ 13037:f7af3834405c stable
plot/private/__axis_limits__.m: Check lower axis limit come first.
Bug #34158.
author | Matthias Jüschke <matthias.jueschke@gmx.net> |
---|---|
date | Fri, 02 Sep 2011 13:27:17 -0400 |
parents | fd0a3ac60b0e |
children | eac43686d791 |
line wrap: on
line diff
--- a/scripts/plot/private/__axes_limits__.m +++ b/scripts/plot/private/__axes_limits__.m @@ -44,7 +44,11 @@ if (!isnumeric (arg) && any (size(arg(:)) != [2, 1])) error ("%s: argument must be a 2 element vector", fcn); else - set (h, fcn, arg(:)); + if (arg(1) >= arg(2)) + error ("%s: axis limits must be increasing", fcn) + else + set (h, fcn, arg(:)); + endif endif endif endif