Save last figure position
2 次查看(过去 30 天)
显示 更早的评论
Hi,
Is there a way to save the position property of the last active figure?
Regards, Adi
Edit: OK, Thank you for answering so quickly.
0 个评论
采纳的回答
Jan
2011-7-6
What is "last"? The last one before closing the Matlab session? The position of a dialog before closing?
For the later you can define the CloseRequestFcn and DeletFcn such that "get(FigureHandle, 'Position')" is used to get the position and store it in the format you want.
0 个评论
更多回答(1 个)
Gerd
2011-7-6
Hi Adi,
sure you can save the position of the figure.
% get current figure paper position
position = get(gcf,'PaperPosition');
Now you can save the position in a .txt file or in .mat or whatever
Gerd
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!