Skip to content
Snippets Groups Projects
Commit ce28918e authored by Olivier Sauter's avatar Olivier Sauter
Browse files

avoid changing legend with shot numbers for powers

parent da0e730d
Branches
Tags
1 merge request!111Resolve "Read NB2"
...@@ -124,13 +124,17 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty( ...@@ -124,13 +124,17 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
zoom on; zoom on;
end end
maxnblines = 1; maxnblines = 1;
for i=1:numel(linehandles) if strcmp(gdat_data.gdat_request,'powers') && length(ab)==length(gdat_data.label)
maxnblines = max(maxnblines,numel(linehandles{i})); % keep legend from label
if numel(linehandles{i}) == 1 else
set(linehandles{i},'DisplayName',[num2str(gdat_data.shot)]); for i=1:numel(linehandles)
else maxnblines = max(maxnblines,numel(linehandles{i}));
for j=1:numel(linehandles{i}) if numel(linehandles{i}) == 1
set(linehandles{i}(j),'DisplayName',[num2str(gdat_data.shot) ',' num2str(j)]); 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 end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment