Commit ce28918e authored by Olivier Sauter's avatar Olivier Sauter
Browse files

avoid changing legend with shot numbers for powers

parent da0e730d
......@@ -124,13 +124,17 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
zoom on;
end
maxnblines = 1;
for i=1:numel(linehandles)
maxnblines = max(maxnblines,numel(linehandles{i}));
if numel(linehandles{i}) == 1
set(linehandles{i},'DisplayName',[num2str(gdat_data.shot)]);
else
for j=1:numel(linehandles{i})
set(linehandles{i}(j),'DisplayName',[num2str(gdat_data.shot) ',' num2str(j)]);
if strcmp(gdat_data.gdat_request,'powers') && length(ab)==length(gdat_data.label)
% keep legend from label
else
for i=1:numel(linehandles)
maxnblines = max(maxnblines,numel(linehandles{i}));
if numel(linehandles{i}) == 1
set(linehandles{i},'DisplayName',[num2str(gdat_data.shot)]);
else
for j=1:numel(linehandles{i})
set(linehandles{i}(j),'DisplayName',[num2str(gdat_data.shot) ',' num2str(j)]);
end
end
end
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment