-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotPrelimSort.m
More file actions
43 lines (33 loc) · 1.21 KB
/
plotPrelimSort.m
File metadata and controls
43 lines (33 loc) · 1.21 KB
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
42
43
function plotPrelimSort(dateCode, wildcardString)
load('dataLocation.mat');
baseName = [dataLocation,'/',dateCode,'/'];
wildcard = ['RL',dateCode,'_',wildcardString];
fileList = dir([baseName,wildcard]);
plotSize = [5,6];
plottingFigure = figure();
plotN = 1;
page = 1;
for fileN = 1:length(fileList)
load([baseName,fileList(fileN).name]);
if (true) %data.stimulus.stimNumber == 5
figure(plottingFigure);
subplot(plotSize(1),plotSize(2),plotN);
plotWaveforms(data); set(gca,'XTick',[],'YTick',[]);
title(fileList(fileN).name,'Interpreter', 'none');
plotN = plotN + 1;
subplot(plotSize(1),plotSize(2),plotN);
plotEmbeddings(data);
plotN = plotN + 1;
pause(.1);
% When the page is full, save it.
if ((plotN > plotSize(1)*plotSize(2)) || (fileN == length(fileList)))
plotN = 1;
savePDF(['SpikeSortingP',num2str(page),'.pdf']);
close all;
if (fileN < length(fileList))
plottingFigure = figure();
page = page + 1;
end
end
end
end