function e = getevents(h)

e = [];
if ~isempty(h.Plot)
    tslist = h.Plot.getTimeSeries;
    for k=1:length(tslist)
       e = [e(:); tslist{k}.Events(:)];
    end
end
e = unique(e);
    