Skip to content

Commit

Permalink
ENH - added support for cfg.figure=gca, which is more logical in comb…
Browse files Browse the repository at this point in the history
…ination with subplot, see also fieldtrip/website#377
  • Loading branch information
robertoostenveld committed Apr 8, 2021
1 parent 2c8e387 commit 68835fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion private/open_figure.m
Expand Up @@ -42,9 +42,14 @@
% this will open a new one if there is no figure yet
h = clf;

case 'gca'
% use the current axes but do not clear them
% this will open a new figure if there is no figure yet
h = gca;

case 'gcf'
% use the current figure but do not clear it
% this will open a new one if there is no figure yet
% this will open a new figure if there is no figure yet
h = gcf;

otherwise
Expand Down

0 comments on commit 68835fd

Please sign in to comment.