time | Calls | line |
---|
| | 724 | function setDisplayNames(ch,strings)
|
| | 725 |
|
< 0.001 | 8 | 726 | if ~isempty(ch)
|
< 0.001 | 8 | 727 | if isempty(strings)
|
| | 728 | matlab.graphics.illustration.internal.generateDisplayNames(ch);
|
< 0.001 | 8 | 729 | else
|
< 0.001 | 8 | 730 | for k=1:length(ch)
|
< 0.001 | 56 | 731 | displayNameStr = deblank(strings{k});
|
| | 732 | % If the strings provided are a CHAR matrix, then we must split
|
| | 733 | % them up using \n characters into a single char. g964785
|
< 0.001 | 56 | 734 | if ~isempty(displayNameStr) && ~isvector(displayNameStr)
|
| | 735 | tempDisplayStr = deblank(displayNameStr(1,:));
|
| | 736 | for l = 2:size(displayNameStr,1)
|
| | 737 | tempDisplayStr = sprintf('%s\n%s', tempDisplayStr, deblank(displayNameStr(l,:)));
|
| | 738 | end
|
| | 739 | displayNameStr = tempDisplayStr;
|
< 0.001 | 56 | 740 | end
|
| | 741 | % Use 'set' instead of dot notation so that
|
| | 742 | % default/factory/remove are treated as special keywords.
|
0.006 | 56 | 743 | set(ch(k),'DisplayName', displayNameStr);
|
< 0.001 | 56 | 744 | end
|
< 0.001 | 8 | 745 | end
|
< 0.001 | 8 | 746 | end
|
Other subfunctions in this file are not included in this listing.