function InteThres(hObject, eventdata)

global var h


subplot(2,14,13:14)

for i=1:length(var.inte)
    intinte(i) = var.intensity(var.inte(i,1),var.inte(i,2));
    PSinte(i) = var.PointSum(var.inte(i,1),var.inte(i,2));
end

minint = var.InteConvThres1 - 10;
maxint = var.InteConvThres1 + 10;
minPS = min(0.5*var.IntePSThres2+0.5*min(PSinte),0.999*var.IntePSThres2);
maxPS = max(PSinte);

plot(intinte,PSinte,'.')
hold on
plot([var.InteConvThres1 var.InteConvThres1 maxint maxint var.InteConvThres1], ...
    [maxPS var.IntePSThres2 var.IntePSThres2 maxPS maxPS], ...
    'r:', 'linewidth',1);

% plot([var.InteConvThres2 var.InteConvThres2 maxint maxint var.InteConvThres2], ...
%     [maxPS var.IntePSThres1 var.IntePSThres1 maxPS maxPS], ...
%     'g-');
hold off
xlim([minint maxint])
ylim([minPS maxPS])


[x,y] = ginput(1);
var.New_InteConvThres1 = x;
var.New_IntePSThres2 = y;

show_interactions_new;

end

