Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gdat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
gdat
Commits
19904da4
Commit
19904da4
authored
9 months ago
by
Olivier Sauter
Browse files
Options
Downloads
Patches
Plain Diff
fix legend to add on to linehandles if multiple shots
parent
77a983e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!153
Add multi shot
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/gdat_plot.m
+5
-2
5 additions, 2 deletions
matlab/gdat_plot.m
with
5 additions
and
2 deletions
matlab/gdat_plot.m
+
5
−
2
View file @
19904da4
...
...
@@ -40,10 +40,12 @@ if doplot==0; return; end
redo_legend_from_Tags
=
0
;
do_legend
=
1
;
nb_linehandles_current
=
numel
(
linehandles
);
for
ishot
=
1
:
numel
(
gdat_data
)
nb_linehandles_prev
=
nb_linehandles_current
;
if
all
(
isfield
(
gdat_data
(
ishot
),{
'data'
,
't'
}))
&&
~
isempty
(
gdat_data
(
ishot
)
.
data
)
&&
~
isempty
(
gdat_data
(
ishot
)
.
t
)
fighandle
=
get
(
0
,
'CurrentFigure'
);
if
numel
(
gdat_data
)
>
1
&&
gdat_data
(
1
)
.
gdat_params
.
doplot
==
1
if
ishot
>
1
&&
gdat_data
(
1
)
.
gdat_params
.
doplot
==
1
% assume that for a series of shot, need doplot=-1 after 1st plot if doplot was 1 in request
doplot
=
-
1
;
end
...
...
@@ -161,12 +163,13 @@ for ishot=1:numel(gdat_data)
zoom
on
;
end
maxnblines
=
1
;
nb_linehandles_current
=
numel
(
linehandles
);
if
~
exist
(
'ab'
,
'var'
),
ab
=
get
(
gca
,
'children'
);
end
if
do_legend
==
0
||
redo_legend_from_Tags
||
any
(
strcmp
(
gdat_data
(
ishot
)
.
gdat_params
.
data_request
,
'powers'
))
...
||
(
numel
(
ab
)
==
numel
(
gdat_data
(
ishot
)
.
label
)
&&
numel
(
ab
)
>
1
)
% keep legend as is
else
for
i
=
1
:
numel
(
linehandles
)
for
i
=
nb_linehandles_prev
+
1
:
nb_
linehandles
_current
maxnblines
=
max
(
maxnblines
,
numel
(
linehandles
{
i
}));
if
numel
(
linehandles
{
i
})
==
1
set
(
linehandles
{
i
},
'DisplayName'
,[
num2str
(
gdat_data
(
ishot
)
.
shot
)]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment