plot and data aggregation