function delgco

% delete graphics objects with the mouse...
% clicking either the left or middle mouse button while the pointer is
% over a graphics object (line, axes, text, whatever...) deletes that
% object.  clicking the right mouse button terminates the deletion session
% without affecting the plot.

% dail, 6/18/98

[a,b,bu] = ginput(1);
while bu~=3
 delete(gco)
 [a,b,bu] = ginput(1);
end
 
