Skip to content

Commit

Permalink
use a new invisible figure to determine if HG2 is used, rather than gcf
Browse files Browse the repository at this point in the history
  • Loading branch information
altmany committed Feb 27, 2015
1 parent 906d774 commit 2db12c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion using_hg2.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@

function tf = using_hg2(fig)
try
if nargin < 1, fig = gcf; end
if nargin < 1, fig = figure('visible','off'); end
tf = ~graphicsversion(fig, 'handlegraphics');
catch
tf = false;
end
if nargin < 1, delete(fig); end
end

0 comments on commit 2db12c0

Please sign in to comment.