function ExtThres(hObject, eventdata)

global h var

subplot(2,14,27:28)

for i=1:length(var.ext)
    intext(i) = var.intensity(var.ext(i,1),var.ext(i,2));
    PSext(i) = var.PointSum(var.ext(i,1),var.ext(i,2));
end

minint = var.ExtConvThres1 - 5;
maxint = var.ExtConvThres1 + 5;
minPS = min(0.5*var.ExtPSThres2+0.5*min(PSext),0.999*var.ExtPSThres2);
maxPS = max(PSext);

plot(intext,PSext,'.')
hold on
plot([var.ExtConvThres1 var.ExtConvThres1 maxint maxint var.ExtConvThres1], ...
    [maxPS var.ExtPSThres2 var.ExtPSThres2 maxPS maxPS], ...
    'r:', 'linewidth',1);


hold off
xlim([minint maxint])
ylim([minPS maxPS])


[x,y] = ginput(1);
var.New_ExtConvThres1 = x;
var.New_ExtPSThres2 = y;

show_interactions_new;

end

