
function highlight_cells(picked_cells,corners_x,corners_y,linecolor,linewidth,linefactor)
%Fred Cross June 2016 The Rockefeller University

%outline cells in pickedcells matrix


for row=1:size(picked_cells,1)
    for col=1:size(picked_cells,2)
        if picked_cells(row,col)  
            
            line([corners_x(row+1,col+1) ,corners_x(row+1,col) ,corners_x(row,col) ],...
                [corners_y(row+1,col+1) ,corners_y(row+1,col) ,corners_y(row,col) ],...
                'Color',linecolor,'LineWidth',linewidth);
            
             line([corners_x(row,col) ,corners_x(row,col+1) ,corners_x(row+1,col+1) ],...
                [corners_y(row,col) ,corners_y(row,col+1) ,corners_y(row+1,col+1) ],...
                'Color',linecolor,'LineWidth',linefactor*linewidth);
    %%
        end
    end
end 