Update plots/data.py

Modify the aggregation codes to fit flot's  scheme.