function [] = formatplot(HH, h, TT, TT2, FontSize)
%function [] = formatplot(HH, h, TT, TT2, FontSize)
% This function is basically used for formatting Figures (because the MATLAB
% default formatting often is not suitable for publication)
%
% INPUTS:
%       HH:	    Figure handle ('gcf' usually)
%	    h:	    Usually 'gca' --axis handle
%       TT:     Handles to titles and legends
%       TT2:    Handles to titles and legends with larger font and more bolded
%
% NOTE: Feel free to change this little function for a specific plotting 
% application, but the put a local copy of this file in the example folder. 
%
% Author: Matt Ueckermann

if (nargin<5)
   fontsize1 = 12;
   fontsize2 = 13;
else
   fontsize1 = FontSize;
   fontsize2 = FontSize+1;
end;

for i = 1:length(HH)
    set(HH(i),'LineWidth',2,'MarkerSize',2);
end;

set(h,'fontsize',fontsize1);

for i = 1:length(TT)
    set(TT(i),'fontsize',fontsize1);
end;

if nargin==4
    for i = 1:length(TT2)
        set(TT2(i),'fontsize',fontsize2,'FontWeight','bold');
    end;
end;
