function [ h ] = niwi_niceplot( h,size)
% NIWI_NICEPLOT(h,size)
% takes the Figure handle h and adjusts the linewidths and Fontsizes such
% that the svg-s exportet from niwi_Plot2LaTex give nice figures in LaTex.
% size is a two-vector (default [15 12])


%% process options, first set default
 
if nargin<2
   size=[15 12]; 
end

%% set Fontsize and linewidth of everything
set(findall(h,'-property','Fontsize'),'Fontsize',20); % change linewidth
set(findall(h,'-property','LineWidth'),'LineWidth',2); % change linewidth
set(findall(h,'-property','Box'),'Box','on');

set(h,'Units','centimeters','Position',[[20-size(1)/2 15-size(2)/2] size])


end


