added sorting for mean.pv plots