Commit 33ecbc96 authored by Julius Welzel's avatar Julius Welzel

axis labeling

parent 1b9b5ea0
......@@ -26,7 +26,7 @@
function area_inter = inter_area(chanlocs, map, n_inter, ID, PATHOUT,c_map)
function area_inter = inter_area(chanlocs, map, n_inter, ID, PATHOUT,c_map, FB)
% Calculate and interpolate X & Y coordinates from chanlocs
p_interp = 200; % points to interpolate (should be higher for less channels
......@@ -53,28 +53,30 @@ figure
for i = 1:length(lvl_inter)
try
ax = subplot(p(1),p(2),i)
ax = subplot(p(1),p(2),i);
mesh(Xgrid,Ygrid,Z) % plot map 3D
colormap(ax,c_map)
hold on
surf(Xgrid,Ygrid,lvl_inter(i)*ones(size(Z)),'FaceColor','k','FaceAlpha',0.08,'EdgeColor','none')
hold on
zlabel 'z-Score [\sigma]'
set(gca,'YTickLabel',[]);
set(gca,'XTickLabel',[]);
% Take the difference between the two surface heights and find the contour
% where that surface is zero.
zdiff = Z - (lvl_inter(i)*ones(size(Z)));
C = contours(Xgrid, Ygrid, zdiff,[0,0]);
%claculate the intersection area
[a, ca] = cont_area(C,Xgrid,Ygrid,Z);
% Visualize the line.
cl = line(ca.xL, ca.yL, ca.zL, 'Color', 'k', 'LineWidth', 3);
title(['Area : ' num2str(round(a,2)) ' at z = ' num2str(round(lvl_inter(i),2))])
title(['A^2 : ' num2str(round(a,2)) ' // z : ' num2str(round(lvl_inter(i),2))]);
area_inter(i) = a;
catch
break
area_inter(i) = 0;
end
......@@ -82,7 +84,7 @@ end
sgtitle (['Subj ' num2str(ID)])
save_fig(gcf,PATHOUT,['SurfArea_subj_' num2str(ID)],'figtype','.png','figsize',[0 0 45 25])
save_fig(gcf,PATHOUT,['SurfArea_subj_' FB '_' num2str(ID)],'figtype','.png','figsize',[0 0 35 25],'fontsize',10)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment