function output_txt = datacursorUpdateFcn(~,event_obj) % ~ Currently not used (empty) % event_obj Object containing event data structure % output_txt Data cursor text (string or cell array of strings) x = event_obj.Position(1); y = event_obj.Position(2); tag = get(event_obj.Target, 'Tag'); output_txt = {sprintf('%s, %s', tag, datestr(x, 'HH:MM')), ... sprintf('%3.1f', y)}; end