Commit 45dac63b authored by Julius Welzel's avatar Julius Welzel

added figure type

parent 9f629ca8
......@@ -25,12 +25,15 @@ end
p = inputParser;
defaultFontSize = 12;
defaultFigSize = [0 0 30 20];
defaultFigType = '.png';
addParameter(p,'fontsize',defaultFontSize,@isnumeric);
addParameter(p,'figsize',defaultFigSize);
addParameter(p,'figtype',defaultFigType);
parse(p,varargin{:});
font_s = p.Results.fontsize;
fig_s = p.Results.figsize;
fig_t = p.Results.figtype;
......@@ -38,7 +41,7 @@ fig_s = p.Results.figsize;
set(findall(0,'type','axes'),'FontSize',font_s) % set font size of axis
set(F, 'Units','centimeters','Position',fig_s); % set figure size in cm
set(F,'color','white'); % set figure background color in rgb mode
saveas(F,[PATHOUT NAME '.png']); % save figure
saveas(F,[PATHOUT NAME fig_t]); % save figure
close;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment