changeset 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 8abb190e6cc8
children 50a27a3b5131
files scripts/plot/private/__axes_limits__.m
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/private/__axes_limits__.m	Thu Sep 01 14:36:31 2011 -0700
+++ b/scripts/plot/private/__axes_limits__.m	Fri Sep 02 13:27:17 2011 -0400
@@ -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