-
Notifications
You must be signed in to change notification settings - Fork 0
/
plotOverlay.m
executable file
·41 lines (36 loc) · 1016 Bytes
/
plotOverlay.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function plotOverlay(handles, dataType)
% Plot an ovelay of selected data channels. dataType = {'F1'(default), 'F4' or 'Current')}
%% Check input arguments
if nargin==1
dataType='F1';
end
%% Define which data type to plot
switch dataType
case 'F1'
j=1;
yLabelString = 'Intensity';
case 'F4'
j=4;
yLabelString = 'Intensity';
case 'Current'
j=5;
yLabelString = 'Current';
end
%% Plot data
fs = 12;
figure; hold all;
nDatasets = length(handles.myData.Dataset);
for n=1:nDatasets
x = 1:length(handles.myData.Dataset{n}{j});
plot(x./120, handles.myData.Dataset{n}{j});
end
set(gca, 'FontSize', fs);
xlabel('Time (min)', 'FontSize', fs);
ylabel(yLabelString, 'FontSize', fs);
% Legend
legend(handles.myData.filenames);
legendLocation = 'NorthWest';
if strcmp(dataType, 'Current')
legendLocation = 'SouthEast';
end
set(legend, 'Location', legendLocation, 'Box', 'off', 'FontSize', 9);