-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplotftwpli.m
37 lines (29 loc) · 1.04 KB
/
plotftwpli.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
function plotftwpli(basename)
loadpaths
bands = {
'delta'
'theta'
'alpha'
'beta'
'gamma'
};
fontname = 'Helvetica';
fontsize = 28;
savefile = sprintf('%s%s_mohawk.mat',filepath,basename);
specinfo = load(savefile);
figure('Name',basename,'Color','white'); hold all
plot(specinfo.freqs,mean(specinfo.chanwpli,1),'LineWidth',2);
set(gca,'XLim',[specinfo.freqs(1) specinfo.freqs(end)],'FontSize',fontsize,'FontName',fontname);
xlabel('Frequency (Hz)','FontSize',fontsize,'FontName',fontname);
ylabel('WPLI','FontSize',fontsize,'FontName',fontname);
for f = 1:4
line([specinfo.freqlist(f,1) specinfo.freqlist(f,1)],ylim,'LineWidth',1,...
'LineStyle','-.','Color','black');
line([specinfo.freqlist(f,2) specinfo.freqlist(f,2)],ylim,'LineWidth',1,...
'LineStyle','-.','Color','black');
% text(specinfo.freqlist(f,1),ylimits(2),...
% sprintf('\\%s',bands{f}),'FontName',fontname,'FontSize',fontsize);
end
box on
print(gcf,sprintf('%s/figures/%s_wpli.tif',filepath,basename),'-dtiff','-r150');
close(gcf);