-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error Saving Figure in saveplotlyfig
in MATLAB R2024b
#522
Comments
Currently I edited: function p = saveplotlyfig(figure_or_data, filename, varargin)
%--PARSE FIGURE_OR_DATA--%
if iscell(figure_or_data)
p = plotlyfig('Visible','off');
p.data = figure_or_data;
p.layout = struct();
p.PlotOptions.Strip = false;
elseif isstruct(figure_or_data);
p = plotlyfig('Visible','off');
p.data = figure_or_data.data;
p.layout = figure_or_data.layout;
p.PlotOptions.Strip = false;
elseif isa(figure_or_data, 'plotlyfig')
p = figure_or_data;
p.PlotOptions.Strip = false;
elseif ishandle(figure_or_data)
% if strcmp(handle(figure_or_data).classhandle.name,'figure')
%----Royi----%
if strcmp(get(figure_or_data, 'type'), 'figure')
%----Royi----%
p = plotlyfig(figure_or_data, 'strip', false);
end
else
errkey = 'plotlySaveImage:invalidInputs';
error(errkey,plotlymsg(errkey));
end
%--MAKE CALL TO SAVEAS METHOD--%
p.saveas(filename, varargin{:});
end
|
OK, Even after the fix I can't save the figure. |
Hi, could you please share some steps to reproduce this issue? E.g. a minimal reproducible example or a detailed description of the actions leading to the issue. This will help investigate the problem more effectively. Thanks! |
Nothing special. Just using the latest version of PlotLy with MATLAB R2024b. |
Do you have a script to generate the plot you're trying to save with |
In
saveplotlyfig
the following will fail:As
handle(figure_or_data).classhandle
will generatenrecognized method, property, or field 'classhandle' for class 'matlab.ui.Figure'.
.The text was updated successfully, but these errors were encountered: