make the plot_statistics script a bit more readable

As I mentioned in the discussion of the other pull request this cleans up the mess in plotting script at least a bit :).