function output_txt = labelPID(obj,event_obj,...
                xydata,labels)

% see http://www.mathworks.com/help/matlab/data_analysis/interacting-with-graphed-data.html

% get x,y of highlighted data point (cursor position)
pos = get(event_obj,'Position');
x = pos(1); y = pos(2);
output_txt{1} = sprintf('lon=%.4f  lat=%.4f',360+x,y);

% find index of datapoint, to retrieve observation name
ix = find(xydata(:,1)==x & xydata(:,2)==y);
output_txt{2} = sprintf('PID %s  index %d',cell2mat(labels(ix)),ix);
