comparison scripts/plot/axis.m @ 13031:d2997525fcb6 stable

Fix for bug #34158. * plot/axis.m: Check that lower axis limits are less han upper limits.
author Ben Abbott <bpabbott@mac.com>
date Wed, 31 Aug 2011 18:19:17 -0400
parents f96b9b9f141b
children d7f74a8bdc46 0c3b1a359998
comparison
equal deleted inserted replaced
13028:9b191d0e547f 13031:d2997525fcb6
275 if (len != 2 && len != 4 && len != 6) 275 if (len != 2 && len != 4 && len != 6)
276 error ("axis: expecting vector with 2, 4, or 6 elements"); 276 error ("axis: expecting vector with 2, 4, or 6 elements");
277 endif 277 endif
278 278
279 for i = 1:2:len 279 for i = 1:2:len
280 if (ax(i) == ax(i+1)) 280 if (ax(i) >= ax(i+1))
281 error ("axis: limits(%d) cannot equal limits(%d)", i, i+1); 281 error ("axis: limits(%d) must be less than limits(%d)", i, i+1);
282 endif 282 endif
283 endfor 283 endfor
284 284
285 if (len > 1) 285 if (len > 1)
286 set (ca, "xlim", [ax(1), ax(2)]); 286 set (ca, "xlim", [ax(1), ax(2)]);