function ClickCallback( hObject,~,h_line)
pos=get(hObject,'CurrentPoint');
%disp(['You clicked X:',num2str(pos(1)),', Y:',num2str(pos(2))]);

dx = pos(1)-0.5;
dy = pos(2)-0.5;
mag = 2*sqrt(dx^2+dy^2);
beta = atan2(dy,dx);
disp(['mag = ' num2str(mag) 'beta = ' num2str(beta*180/pi)]);

set(h_line,'Xdata',[0 2*dx]);
set(h_line,'Ydata',[0 2*dy]);
updated = 1;

end

