function [figure1]=createplot_HNR(item,Y1, X1, YMatrix1)
%CREATEFIGURE(Y1,X1,YMATRIX1)
%  Y1:  vector of y data
%  X1:  vector of x data
%  YMATRIX1:  matrix of y data

%  Auto-generated by MATLAB on 07-Jan-2014 17:12:14

% Create figure
%figure1 = figure('PaperSize',[20.98 29.68],'Name','F_0 for item: xyz');
figure1 = figure('PaperType','<custom>','PaperSize',[29.7 21],...
                 'InvertHardcopy','off',...
                 'Color',[1 1 1],...
                 'PaperUnits','centimeters');


% Create axes
axes1 = axes('Parent',figure1,'XTickLabel',{'','','','',''},...
    'XTick',[0 2e+004 4e+004 6e+004 8e+004],...
    'Position',[0.2 0.7 0.7 0.18]);
% Uncomment the following line to preserve the Y-limits of the axes
ylim([-1 1])
box('on');
hold('all');

% Create plot
plot(Y1,'Parent',axes1);

% Create title
title(['HNR for item ' secureText(item)]);

% Create axes
axes2 = axes('Parent',figure1,...
    'XTick',[0 1e+004 2e+004 3e+004 4e+004 5e+004 6e+004 7e+004 8e+004],...
    'Position',[0.2 0.1245 0.7 0.5]);
hold('all');

% Create multiple lines using matrix input to plot
plot1 = plot(X1,YMatrix1,'Parent',axes2);
set(plot1(2),'Color',[0 1 0]);
set(plot1(3),'Marker','o','LineWidth',2,'LineStyle','none');
set(plot1(4),'Marker','x','LineWidth',2,'LineStyle','none','Color',[0 1 0]);
legend([plot1(3),plot1(4)],'lab implementation','reference','Location','SouthWest');
% Create xlabel
xlabel('samples');

% Create ylabel
ylabel('F_0 / Hz');

set(figure1,'Units','Centimeters');
figPos=get(figure1,'Position');
set(figure1,'Position',[figPos(1) figPos(2) 29.7 21]);

