Skip to content

Commit 45f2b3a

Browse files
Remove use of classhandle property, which is no longer available in modern MATLAB versions
1 parent d0c8b3f commit 45f2b3a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

plotly/saveplotlyfig.m

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@
5151
elseif isa(figure_or_data, 'plotlyfig')
5252
p = figure_or_data;
5353
p.PlotOptions.Strip = false;
54-
elseif ishandle(figure_or_data)
55-
if strcmp(handle(figure_or_data).classhandle.name,'figure')
56-
p = plotlyfig(figure_or_data, 'strip', false);
57-
end
54+
elseif ishandle(figure_or_data) && isa(figure_or_data,"matlab.ui.Figure")
55+
p = plotlyfig(figure_or_data, 'strip', false);
5856
else
5957
errkey = 'plotlySaveImage:invalidInputs';
6058
error(errkey,plotlymsg(errkey));

0 commit comments

Comments
 (0)