Skip to content

Commit

Permalink
#7: Small bug fixes to xp_handles_newfig.m
Browse files Browse the repository at this point in the history
  • Loading branch information
davestanley committed Mar 20, 2017
1 parent bbaccb5 commit 1fd1b1c
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions library_plots/xp_handles_newfig.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
foldername = op.save_figname_path;
end


if op.supersize_me && strcmp(op.visible,'on')
fprintf('For supersize_me mode, visible should be off. Setting to off \n');
op.visible = 'off';
end

if ~op.save_figures && strcmp(op.visible,'off')
fprintf('For supersize_me mode or visible off, should save figures. Autosaving figures... \n');
op.save_figures = 1;
end

if op.save_figures
mkdir_silent(foldername);
end
Expand All @@ -40,15 +51,6 @@
pos = [0,0,1,1];
if op.supersize_me
pos(3:4) = pos(3:4) * op.supersize_me_factor;
if strcmp(op.visible,'on')
fprintf('For supersize_me mode, visible should be off. Setting to off \n');
op.visible = 'off';
end
end

if ~op.save_figures && strcmp(op.visible,'off')
fprintf('For supersize_me mode or visible off, should save figures. Autosaving figures... \n');
op.save_figures = 1;
end

h.hf(i) = figure('Units','normalized','Position',pos,'visible',op.visible); h.hsg(i) = xp.data{i}();
Expand Down

0 comments on commit 1fd1b1c

Please sign in to comment.