0

Before matplotlib used to use the index as the x-axis, which is what I want.

Now it doesn't, why is this?

            Close   Prediction
Date        
2017-06-21  155.03  152.586975
2017-06-22  154.89  153.450424
2017-06-23  158.02  150.374527
2017-06-26  157.50  149.241684
2017-06-27  151.03  148.880630

Code

import matplotlib.pyplot as plt2

plt2.plot(joined['Prediction'], color='red', label='Prediction')
plt2.plot(joined['Close'], color='blue', label='Actual')
plt2.legend(loc='upper left')
plt2.show()
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
OptimusPrime
  • 619
  • 8
  • 17

1 Answers1

0

You could use Pandas plot:

joined.plot()

enter image description here

Scott Boston
  • 147,308
  • 15
  • 139
  • 187