Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 540ac2e

Browse files
Refactor showlegend setting
1 parent 33ed38a commit 540ac2e

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

plotly/plotlyfig_aux/handlegraphics/updateAlternativeBoxplot.m

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,13 @@ function updateBoxplotLine(obj, axIndex, plotData, traceIndex)
5757
obj.data{traceIndex}.marker = extractLineMarker(plotData);
5858
obj.data{traceIndex}.line = extractLineLine(plotData);
5959

60-
%-legend-%
61-
leg = plotData.Annotation;
62-
legInfo = leg.LegendInformation;
63-
64-
switch legInfo.IconDisplayStyle
65-
case 'on'
66-
showLeg = true;
67-
case 'off'
68-
showLeg = false;
60+
switch plotData.Annotation.LegendInformation.IconDisplayStyle
61+
case "on"
62+
obj.data{traceIndex}.showlegend = true;
63+
case "off"
64+
obj.data{traceIndex}.showlegend = false;
6965
end
7066

71-
obj.data{traceIndex}.showlegend = showLeg;
72-
7367
if isempty(obj.data{traceIndex}.name)
7468
obj.data{traceIndex}.showlegend = false;
7569
end

0 commit comments

Comments
 (0)