MATLAB: Marking where one clicked with ginput

ginput

Hi Community,
I was wondering if it were possible to be able to know where one clicked on an image while using ginput(n), i.e. having a red dot over the area where I clicked so that I later am able to remember where it is that I already clicked in case I "zoned out" while clicking.
Thanks in advance.

Best Answer

I did something similar to this when measuring diameters of soot particles. I would frequently get lost as to where I last clicked, so I decided to create some text where I clicked, stating what was first clicked and what was second clicked.
[x,y] = ginput(1);
h1 = text(x,y,'1', ...
'HorizontalAlignment','center', ...
'Color', [1 0 0], ...
'FontSize',8);
%etc...

%to delete text:
delete(h1);
%etc...