Mercurial > hg > octave-lyh
diff scripts/plot/legend.m @ 13279:984359717d71
Use common code idiom for checking whether a double value is an integer.
* num2str.m, rotdim.m, get_first_help_sentence.m, ind2rgb.m,
commutation_matrix.m, figure.m, legend.m, polyfit.m, bartlett.m, blackman.m,
detrend.m, hamming.m, hanning.m, factorial.m, mode.m, skewness.m, statistics.m,
mcnemar_test.m: Use idiom 'x == fix (x)' to test for integerness.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 05 Oct 2011 13:10:10 -0700 |
parents | 434e227b100b |
children | bfaacd5e7379 |
line wrap: on
line diff
--- a/scripts/plot/legend.m +++ b/scripts/plot/legend.m @@ -158,7 +158,7 @@ if (nargs > 0) pos = varargin{nargs}; - if (isnumeric (pos) && isscalar (pos) && round (pos) == pos) + if (isnumeric (pos) && isscalar (pos) && pos == fix (pos)) if (pos >= -1 && pos <= 4) position = [{"northeastoutside", "best", "northeast", "northwest", "southwest", "southeast"}] {pos + 2};