time | calls | line |
---|
| | 1 | function refresh(h)
|
| | 2 | %REFRESH Refresh figure.
|
| | 3 | % REFRESH causes the current figure window to be redrawn.
|
| | 4 | % REFRESH(FIG) causes the figure FIG to be redrawn.
|
| | 5 |
|
| | 6 | % D. Thomas 5/26/93
|
| | 7 | % Copyright 1984-2009 The MathWorks, Inc.
|
| | 8 |
|
| 3 | 9 | if nargin==1,
|
| 3 | 10 | if ~any(ishghandle(h, 'figure'))
|
| | 11 | error(message('MATLAB:refresh:InvalidHandle'))
|
| | 12 | end
|
| | 13 | else
|
| | 14 | h = gcf;
|
| | 15 | end
|
| | 16 |
|
| | 17 | % The following toggle of the figure color property is
|
| | 18 | % only to set the 'dirty' flag to trigger a redraw.
|
| 3 | 19 | color = get(h,'color');
|
| 3 | 20 | if ~ischar(color) && all(color == [0 0 0])
|
| | 21 | tmpcolor = [1 1 1];
|
| 3 | 22 | else
|
| 3 | 23 | tmpcolor = [0 0 0];
|
| 3 | 24 | end
|
| 3 | 25 | set(h,'color',tmpcolor,'color',color);
|