function[e] = plot_aggregates(e, table, event) data = get(table, 'Data'); if ~isempty(event) if ~isempty(event.Indices) selected = event.Indices(1); % selected row end end e = evalin('base', 'e'); for a = 1:length(e.aggregates) if (data{a,1}) highlight=0; if ~isempty(event) if ~isempty(event.Indices) if (event.Indices(2) > 1) %% row highlighted highlight=1; end end end plot_aggregate(e, a, highlight); end end