Your script does not show what youre plotting, but the plot call itself looks already wrong, seems youre only plotting the first value. A curve is made from many different values, one for any bar, like Curve[MaxN].Values[Bar] or so.