function createfigure(X1, YMatrix1)
%CREATEFIGURE(X1,YMATRIX1)
%  X1:  vector of x data
%  YMATRIX1:  matrix of y data

data1 = TDMS_getStruct('2013Sep23DIWater1mmSSBead.tdms');
data2 = TDMS_getStruct('2013Sep24DIWater0-8mmAlBead.tdms');
data3 = TDMS_getStruct('2013Sep24DIWater30XCoarseGlassBeads.tdms');
data4 = TDMS_getStruct('2013Sep249mMNaCl40CoarseGlassBeads.tdms');
data5 = TDMS_getStruct('2013Sep250-5MNaClCoarseGlassBeads.tdms');

YMatrix1(1,:)=data1.Untitled.Dev1_ai0_1.data;
YMatrix1(2,:)=data2.Untitled.Dev1_ai0_1.data;
YMatrix1(3,:)=data3.Untitled.Dev1_ai0_1.data;
YMatrix1(4,:)=data4.Untitled.Dev1_ai0_1.data;
YMatrix1(5,:)=data5.Untitled.Dev1_ai0_1.data;

%  Auto-generated by MATLAB on 26-Sep-2013 09:20:09

% Create figure
figure1 = figure;

% Create axes
axes1 = axes('Parent',figure1);
%% Uncomment the following line to preserve the X-limits of the axes
% xlim(axes1,[0.129950495049505 5.0226897689769]);
%% Uncomment the following line to preserve the Y-limits of the axes
ylim(axes1,[1.1 1.4]);
box(axes1,'on');
hold(axes1,'all');

% Create multiple lines using matrix input to plot
X1 = (0:999999)*(1/200000);
plot1 = plot(X1,YMatrix1,'Parent',axes1);
set(plot1(1),'DisplayName','1X 1000uM SS Ball DI H2O');
set(plot1(2),'DisplayName','1X 800uM Al Ball DI H2O');
set(plot1(3),'DisplayName','~40X 250-400uM Glass Beads DI H2O');
set(plot1(4),'DisplayName','~40X 250-400uM 9mM NaCl');
set(plot1(5),'DisplayName','~40X 250-400uM 0.5M NaCl');

% Create xlabel
xlabel('Time (sec)');

% Create ylabel
ylabel('Volts');

% Create title
title({'Coulter Trough Runs','3 Electrode 1/2 Bridge, 2 kHz 1 Vp-p'});

% Create legend
legend1 = legend(axes1,'show');
set(legend1,...
    'Position',[0.149544948602108 0.712484785254739 0.178353957965036 0.171622326551904]);

