|
From: | Michael Godfrey |
Subject: | Re: Help with 'xlim' property |
Date: | Tue, 23 Jun 2015 00:36:12 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Here is from Matlab 2015a: >> plot (1:10) >> set (gca, 'xlim', [1 3 5; 2 4 6]) Error using matlab.graphics.axis.Axes/set While setting the 'XLim' property of 'Axes': Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf >> set (gca, 'xlim', [1 2 4]) Error using matlab.graphics.axis.Axes/set While setting the 'XLim' property of 'Axes': Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf >> set (gca, 'xlim', [1 5]') >> set (gca, 'xlim', [1 8]) >> Not quite your expectation. Matlab has many surprises... :-) On 06/23/2015 12:21 AM, Rik wrote:
6/22/15 I don't think Octave is properly validating the 'xlim', 'ylim', etc. properties. It seems to accept any matrix value at all instead of just a 2-element row vector. It's easy enough to change, but I'm hoping someone can verify in Matlab what the following code does. plot (1:10) set (gca, 'xlim', [1 3 5; 2 4 6]) set (gca, 'xlim', [1 2 4]) set (gca, 'xlim', [1 5]') set (gca, 'xlim', [1 8]) I would expect errors out of everything but the last. Thanks, Rik |
[Prev in Thread] | Current Thread | [Next in Thread] |