Problem saving figures with evaluating "Callback"

Hello, I have a problem saving figures. When I try to "save" a figure, the following warning appears on the workspace: "Error while evaluating PushTool ClickedCallback". When I try to "save as" a figure, the following warning appears on the workspace: "Error while evaluating Menu Callback". Can someone help me? thanks.

댓글 수: 4

Jan
Jan 2017년 1월 18일
These are only the header lines of the error and the warn message. Can you provide the full messages? How do you try to save?
Alessandro Panzera
Alessandro Panzera 2017년 1월 19일
편집: Alessandro Panzera 2017년 1월 19일
Thanks Jan for your answer,
I try to save the figure using "file-save", "file-save as" or just "pushing the save bottom" and they don't work. Matlab doesn't save the figure as a .fig and shows me in the workspace the only one error line, that is: "Error while evaluating PushTool ClickedCallback".
Also, I can save the figure in the other format, the problem exists only when I tried to save the fisure as a .fig.
Hope it helps you.
Which MATLAB version are you using?
Is it possible that you are using AppDesigner ?
i'm using the last MATLAB version (i.e. 9.1).
I don't find any problems using AppDesigner.

댓글을 달려면 로그인하십시오.

 채택된 답변

Nirav Sharda
Nirav Sharda 2017년 1월 24일
편집: Nirav Sharda 2017년 1월 24일

1 개 추천

You can try to restore search-path to the factory installed state using restoredefaultpath. If after executing this command you are able to save the figures, you can save the current search path using savepath. Please do not execute savepath if restoredefaultpath does not resolve the issue, as it would change your original search path. The path function shows your current search path if you want to save a copy of your original search path before executing the steps I mentioned. I hope this helps !

댓글 수: 4

I am with the same problem and I have tried the solution... but still not able to save the figures. Any other solution?
Jan
Jan 2017년 1월 31일
편집: Jan 2017년 1월 31일
@Pablo: Please post the complete error message.
Sandra Zlabinger
Sandra Zlabinger 2018년 1월 29일
편집: Sandra Zlabinger 2018년 1월 29일
I have exactly the same problem. I use the ButtonDownFcn callback to change yaxis limits when clicking on them and I get the same error message as described above when I want to save my figure as .fig. Saving it as jpg works just fine.
(That's the error message btw: "Error while evaluating Menu Callback"...nothing more)
And Nirav's suggestion doesn't work for me either
I could figure out that the error does not come from the ButtonDownFcn but from the legends. When I don't add legends to my figure (it's a figure with different subplots) I can save my figure as always.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating, Deleting, and Querying Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by