Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SPC
gdat
Commits
05eec5ff
Commit
05eec5ff
authored
Jan 31, 2022
by
Olivier Sauter
Browse files
Merge branch 'add_ids2eqdsk' of gitlab.epfl.ch:spc/gdat into add_ids2eqdsk
parents
7475aacd
4e85d3e7
Pipeline
#94755
passed with stages
in 3 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
matlab/gdat_plot.m
View file @
05eec5ff
...
...
@@ -38,6 +38,7 @@ elseif isfield(gdat_data,'gdat_params') && isfield(gdat_data.gdat_params,'doplot
end
if
doplot
==
0
;
return
;
end
redo_legend_from_Tags
=
0
;
do_legend
=
1
;
if
all
(
isfield
(
gdat_data
,{
'data'
,
't'
}))
&&
~
isempty
(
gdat_data
.
data
)
&&
~
isempty
(
gdat_data
.
t
)
fighandle
=
get
(
0
,
'CurrentFigure'
);
...
...
@@ -63,6 +64,7 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
eval
([
'linehandles{end+1} = plot(gdat_data.eqdsk'
endstr
'.rlim,gdat_data.eqdsk'
endstr
'.zlim,
''
k
''
);'
])
axis
equal
;
title
(
eval
([
'gdat_data.eqdsk'
endstr
'.stitle'
]));
do_legend
=
0
;
elseif
any
(
find
(
size
(
gdat_data
.
data
)
==
length
(
gdat_data
.
t
)))
try
if
length
(
size
(
gdat_data
.
data
))
<=
2
...
...
@@ -154,8 +156,10 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
zoom
on
;
end
maxnblines
=
1
;
if
redo_legend_from_Tags
||
any
(
strcmp
(
gdat_data
.
gdat_params
.
data_request
,
'powers'
))
||
(
numel
(
ab
)
==
numel
(
gdat_data
.
label
)
&&
numel
(
ab
)
>
1
)
% keep legend from label
if
~
exist
(
'ab'
,
'var'
),
ab
=
get
(
gca
,
'children'
);
end
if
do_legend
==
0
||
redo_legend_from_Tags
||
any
(
strcmp
(
gdat_data
.
gdat_params
.
data_request
,
'powers'
))
...
||
(
numel
(
ab
)
==
numel
(
gdat_data
.
label
)
&&
numel
(
ab
)
>
1
)
% keep legend as is
else
for
i
=
1
:
numel
(
linehandles
)
maxnblines
=
max
(
maxnblines
,
numel
(
linehandles
{
i
}));
...
...
@@ -168,7 +172,7 @@ if all(isfield(gdat_data,{'data','t'})) && ~isempty(gdat_data.data) && ~isempty(
end
end
end
if
maxnblines
==
1
;
legend
show
;
end
if
do_legend
==
1
&&
maxnblines
==
1
;
legend
show
;
end
if
strcmp
(
gdat_data
.
gdat_request
,
'mhd'
)
% special case, add legend instead of ylabel
delete
(
hylabel
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment