# HG changeset patch # User Avinoam # Date 1442612762 -10800 # Sat Sep 19 00:46:02 2015 +0300 # Node ID a35e9c10849a58016b776cd7c9452f0db4f40493 # Parent ff904ae0285b5415947e4b127fd8bffab7b8dc4a text.m: allow usage of empty matrix to indicate empty line (bug #43017) * text.m: search for empty string ([] or '') and replace it by '' diff -r ff904ae0285b -r a35e9c10849a scripts/plot/appearance/text.m --- a/scripts/plot/appearance/text.m Tue Sep 15 08:48:35 2015 -0400 +++ b/scripts/plot/appearance/text.m Sat Sep 19 00:46:02 2015 +0300 @@ -145,12 +145,23 @@ if (nx == ny && nx == nz && (nt == nx || nt == 1 || nx == 1)) htmp = zeros (nt, 1); if (nx == 1) + for i=1:numel(string{1}) + if (isempty(string{1}{i})) + string{1}{i} = ''; + endif + endfor htmp = __go_text__ (hax, "string", string{1}, ## varargin first, in case "Units" set for pos. varargin{:}, "position", pos); elseif (nx == nt) for n = 1:nt + for i=1:numel(string{n}) + if (isempty(string{n}{i})) + string{n}{i} = ''; + endif + endfor + htmp(n) = __go_text__ (hax, "string", string{n}, varargin{:}, "position", pos(n,:));