Skip to content

Commit ce1bbbd

Browse files
refactor: Simplify legend display logic and use double quotes in getShowLegend function
1 parent 9b71548 commit ce1bbbd

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

plotly/plotlyfig_aux/helpers/getShowLegend.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
function showLegend = getShowLegend(plotData)
22
try
3-
leg = plotData.Annotation;
4-
legInfo = leg.LegendInformation;
5-
6-
switch legInfo.IconDisplayStyle
7-
case 'on'
3+
switch plotData.Annotation.LegendInformation.IconDisplayStyle
4+
case "on"
85
showLegend = true;
9-
case 'off'
6+
case "off"
107
showLegend = false;
118
end
129
showLegend = showLegend & ~isempty(plotData.DisplayName);

0 commit comments

Comments
 (0)