-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrestorefig.m
More file actions
22 lines (20 loc) · 824 Bytes
/
restorefig.m
File metadata and controls
22 lines (20 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
% FROM:
% http://www.mathworks.com/company/newsletters/digest/december00/export.html;jsessionid=SvdQM1JQTHwF52GqS2nb0gXrnWyYGQjznsRXnyPhRWTjLf3tpZLJ!-248230706
function restorefig(h,old)
%RESTOREFIG Restore a figure's properties
% RESTOREFIG(H,OLD) restores the properties of H specified in
% OLD. The state-difference structure OLD is the output of the
% function APPLYTOFIG. Deleting object handles after the call to
% APPLYFIG might cause undesired behavior.
%
% See also EXPORTFIG, PREVIEWFIG, APPLYTOFIG.
% Copyright 2000 Ben Hinkle
% Email bug reports and comments to bhinkle@mathworks.com
for n=1:length(old.objs)
try
if ~iscell(old.values{n}) & iscell(old.prop{n})
old.values{n} = {old.values{n}};
end
set(old.objs{n}, old.prop{n}, old.values{n});
end
end