Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
% plotting functions
% plot reference image and mask
im =reshape(mean(VSData,1),pixX,pixY);
im = imrotate(im,90);
% in this experiment MEA stage was flipped upside-down
im = flipud(im);
titlefig{1} = 'reference image, 4x magnification';
titlefig{2} = 'Mask pixels for wave propagation';
h=subplot(121), imshow(im,[min(im(:)) max(im(:))])
set(h,'FontSize',16,'FontWeight','bold')
h1=subplot(122), imshow(bw_mask,[0 1])
title(titlefig{1},'FontSize',16,'FontWeight','bold')
title(h1,titlefig{2},'FontSize',16,'FontWeight','bold')
% change legend
h = get(gcf,'Children')
hLeg = [];
for k = 1:length(h)
if strcmpi(get(h(k),'Tag'),'legend')
hLeg = h(k);
break;
end
end
set(hLeg,'Location','SouthEast')
%% distinguishable plots for lineplots
colors = distinguishable_colors(length(p));
for j = 1:length(p)
set(p(j),'Color',colors(j,:))
end
%% create string array for legend
vector_string = [50:50:500];
string_array = cell(1,length(vector_string));
for i = 1:length(vector_string)
string_array{i} = strcat('object distance = ',' ',num2str(vector_string(i)),', mm');
end
%% edit axes in figure
figure_handle = gcf;
allAxesInFigure = findall(figure_handle,'type','axes');
h_axLabels = get(allAxesInFigure,{'XLabel' 'YLabel'});
set(allAxesInFigure,'FontSize',12,'FontWeight','bold')
set([h_axLabels{:}],'FontSize',12,'FontWeight','bold')
%% edit axes in double plots
% set(allAxesInFigure(2),'YLim',[-0.02 0.02],'YTick',[0 0.005 0.1])
set(allAxesInFigure(2),'YLim',[-0.012 0.012],'YTick',[0 0.005 0.1],'YTickLabel',[0 0.005 0.1],'YTickMode','manual','YTickLabelMode','manual')
set(allAxesInFigure(3),'YLim',[-800 800],'YTick',[-700 700])
set(allAxesInFigure(2:3),'XLim',[75000 105000])
%% get handles of current object in figure
h = get(allAxesInFigure(2),'Children');
legend(flipud(h(1:4)),'raw fluorescene','F0 median filter window = 1386','F0 median filter window = 2773','F0 median filter window = 4621')
legend('window length = 4621 frames','window length = 1386 frames','window length = 2773 frames','Location','SouthWest')
%%
% save figures
set(gcf,'PaperPositionMode','auto')
cd \\storage.laur.corp.brain.mpg.de\Personal\CoattiAlex\Presentations\VSD_calibration\figures\2015_09_16
print sampleB_rec1_vsd_rawtrace -djpeg -r300; % % % print MEA_187_avg_VSD_550nm -djpeg -r300;