Skip to content
Snippets Groups Projects
Commit 13967a1d authored by la_29's avatar la_29
Browse files

scale bar rework

parent 6c9a2d6d
No related branches found
No related tags found
No related merge requests found
function [nPixels,microns] = scaleBar(CONSTANTS,targetPixels)
function [nPixels,microns] = scaleBar(CONSTANTS,targetPixels,szim)
if ~exist('targetPixels','var')
targetPixels = 100;
......@@ -9,7 +9,10 @@ microns = targetPixels .* microns_per_pixel;
microns = 5 * round(microns/5);
nPixels = round(microns / microns_per_pixel);
rectangle('Position',[2*size(im,2)-100,25,nPixels,10],'facecolor','w')
text(2*size(im,2)-100+nPixels/2,25,'30um','color','w','HorizontalAlignment','center', ...
'VerticalAlignment','bottom')
% rectangle('Position',[szim(2)-100,25,nPixels,10],'facecolor','w')
% text(szim(2)-100+nPixels/2,25,'30um','color','w','HorizontalAlignment','center', ...
% 'VerticalAlignment','bottom')
rectangle('Position',[szim(2)-30-nPixels,40,nPixels,15],'FaceColor','w');
% text(szim(2)-30-nPixels,15,[num2str(microns) '\mum'],'color','w','VerticalAlignment','top','fontsize',12)
text(szim(2)-30-nPixels,5,[num2str(microns) '\mum'],'color','w','VerticalAlignment','top','fontsize',12)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment