Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Not able to open matlab figure using command

1 visualizzazione (ultimi 30 giorni)
JAY PATEL
JAY PATEL il 24 Lug 2023
Chiuso: JAY PATEL il 31 Lug 2023
I have attached a figure, which is not opening. Command I tried: "openfig(Veloerr.fig)", also "load('Veloerr.fig','-mat')". Both are not working.
If I double click the figure from MATLAB it opens up without any error. Also when I open in online-MATLAB it is opening!
I encountered this when I was saving my all plots in eps format from matlab-figure format. I used a script to convert all .fig files to .eps files using commands see below, It saved many files in eps, but when came to this file it stops with an error.
folder='some/input/path'
figFiles = dir(fullfile(folder, '*.fig'));
for i = 1:numel(figFiles)
fig = openfig(fullfile(folder, figFiles(i).name)); % error line
[~, name, ~] = fileparts(figFiles(i).name);
saveas(fig, fullfile(folder, [name, '.eps']), 'epsc');
close(fig);
end
===> Error is shown below when used command, it shows 'continue' at the end.
openfig('Veloerr.fig');
Error using matlab.graphics.datatip.DataTipTemplate/set.FontSize
Changing properties of DataTipTemplate for double objects is not supported.
Error in matlab.graphics.internal.figfile.FigFile/read (line 31)
hgDataVars = load(filename, '-mat', '-regexp', '^hg[M]');
Error in matlab.graphics.internal.figfile.FigFile
Error in loadFigure (line 31)
FF = matlab.graphics.internal.figfile.FigFile(fullpath);
Error in openfig>localOpenFigure (line 75)
h = loadFigure(filename, visibleAction);
Error in openfig (line 40)
figOut = localOpenFigure(filename, reuse, visibleAction);
DataTipTemplate.DataTipTemplate>DataTipTemplate.set.FontSize is not currently in a debuggable state. Skipping the frame.
K>>
===> Error is shown below when used command,
load('Veloerr.fig','-mat');
Error using matlab.graphics.datatip.DataTipTemplate/set.FontSize
Changing properties of DataTipTemplate for double objects is not supported.
DataTipTemplate.DataTipTemplate>DataTipTemplate.set.FontSize is not currently in a debuggable state. Skipping the frame.
In base workspace.
K>>
ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.14.0.2254940 (R2023a) Update 2
MATLAB License Number: 1085905
Operating System: Linux 3.10.0-1160.80.1.el7.x86_64 #1 SMP Tue Nov 8 15:48:59 UTC 2022 x86_64
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.14 (R2023a)
Image Processing Toolbox Version 11.7 (R2023a)
Parallel Computing Toolbox Version 7.8 (R2023a)
Symbolic Math Toolbox Version 9.3 (R2023a)
Let me know what to do.
  2 Commenti
Keshav
Keshav il 31 Lug 2023
Hi, I tried running the command
load('Veloerr.fig','-mat');
but I'm not able to reproduce the issue from my end. Is there anything else you are doing in the script with the figures?
JAY PATEL
JAY PATEL il 31 Lug 2023
Thanks for your comment, I updated the version after that error vanished.

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by