Changing a graph during a review? I am writing a machine learning manuscript for publication.

In a figure I had two learning curves for parameter 1 (P1) and parameter 2 (P2). Now, the reviewer asked to incorporate parameter 3 (P3) and show the learning curve for that.

The assumption is that the curve for P1 is better than P2 (P1>P2) and the curve with P2 is better than with P3 (P2>P3).

However, after training with parameter 3 I found a curve that shows (P3>P2). Probably P2 curve was stuck at a local minima. Since, my original P1 curve was okay, I was not bothered with the P2 curve that much when I submitted the manuscript.

Since, it is not expected, I retrained all three curves and after retraining I found the desired curves (P1>P2 and P2>P3).

Now, can I put this newer curves in the figure and submit the manuscript? Or I have to keep the original P1 and P2 curves intact?
You are allowed to improve a manuscript during review in areas other than what the reviewers specified! 

Just make sure that you call attention to the changes and explain why you made them somewhere in your response to the reviewers.