I don't get how these two are different :/

While the produced plots seem visually quite similar, there is one fundamental difference between the answer code and your code: the answer is using native matplotlib functions to produce the plot while your code is using pandas plotting functions. Although they can produce identical looking graphs, behind the scenes, things are being handled quite differently. This could explain why the auto-grader is rejecting your answer because some non-visual attribute of the plot object is not identical to the solution.

While it may be possible to get pandas plotting to work, my recommendation would be to rework your code to use matplotlib functions.

It could be something as silly as the scale for your axis is defined slightly different between the two versions. For example: (-501, 3501) vs [-500, 3500] could potentially cause the auto-grader to fail

1 Like

Thanks for clarifying sir!

1 Like