Mercurial > octave-nkf
comparison scripts/plot/draw/private/__errcomm__.m @ 20438:5b7d7051a032 stable
Fix hang when using errorbar with empty dataset (bug #45554).
* __errcomm__.m: Use concatenation to append new errorbar plots to retval,
rather than assignment which can fail if the RHS is empty.
* __errplot__.m: Determine number of plots by checking number of columns in
dataset, but only if dataset is not empty (row is zero for example). Only
process a legend key if the number of plots is greater than 0.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 28 Jul 2015 08:47:27 -0700 |
parents | 00e31f316a3a |
children |
comparison
equal
deleted
inserted
replaced
20433:fc23fbe05f3a | 20438:5b7d7051a032 |
---|---|
47 ndata = 1; | 47 ndata = 1; |
48 data{ndata} = arg; | 48 data{ndata} = arg; |
49 while (k <= nargs) | 49 while (k <= nargs) |
50 arg = varargin{k++}; | 50 arg = varargin{k++}; |
51 if (ischar (arg) || iscellstr (arg)) | 51 if (ischar (arg) || iscellstr (arg)) |
52 retval(end+1,1) = __errplot__(arg, hax, data{1:ndata}); | 52 retval = [retval; __errplot__(arg, hax, data{1:ndata})]; |
53 break; | 53 break; |
54 endif | 54 endif |
55 if (! isnumeric (arg)) | 55 if (! isnumeric (arg)) |
56 error ("%s: data argument %d must be numeric", caller, k-1); | 56 error ("%s: data argument %d must be numeric", caller, k-1); |
57 endif | 57 endif |