t=[0:.1:2*pi];

hold on;
set(gcf,'units','points',...
    'WindowButtonDownFcn','get(gcf,''CurrentPoint'')');
    %%retrieves position of pointer in coordinates determined by 
    %%figure 'units' properties
    
a=plot(t,sin(t));
b=plot(t,cos(t));

p=flipud(get(gca,'children'));
p