improved function PlotDurationCurve