-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrefreshplot.m
42 lines (35 loc) · 920 Bytes
/
refreshplot.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
function refreshplot( self )
% Delete the old line handles.
for i = 1:2
for n = 1:size(self.axis{i}.lineHandles(:),1)
self.deleteHandle(self.axis{i}.lineHandles(n));
end
if ~isempty(self.axis{i}.extrapLineHandles)
for n = 1:size(self.axis{i}.extrapLineHandles(:),1)
self.deleteHandle(self.axis{i}.extrapLineHandles(n));
end
end
for n = 1:size(self.axis{i}.intersectionHandles(:),1)
self.deleteHandle(self.axis{i}.intersectionHandles(n));
end
self.axis{i}.lineHandles = [];
self.axis{i}.intersectionHandles = [];
end
% Independent of the hold status --> hold on
if ishold == 0
self.holding = 0;
hold on
else
self.holding = 1;
end
self.keepTicks = 0;
% Replot the carpet
self.cplot()
self.keepTicks = 0;
% Restore hold functionality.
if self.holding == 0
hold off
end
%obj.needPlotRefresh
self.needPlotRefresh = 0;
end