function xmarksthespot

if isempty(get(0,'CurrentFigure'))
   error('No current figure.')
end

flag = ~ishold;
if flag
   hold on
end

disp('Click on the point where you want to plot an X.')
[x, y] = ginput(1);
plot(x, y, 'xk')
if flag
   hold off
end
