My current graph is displaying the full range of data correctly.
I am having problems setting the x-axis on my graph though. My code is the following:
prices['Timestamp'] = pd.to_datetime(prices['Timestamp'], format='%Y-%m-%d %H:%M:%S')
prices['Timestamp'] = pd.DatetimeIndex(prices['Timestamp'])
prices.index = pd.to_datetime(prices['Timestamp'], format='%Y-%m-%d %H:%M:%S')
prices['Close'].plot()
plt.set_xlim([datetime.date(2017, 12, 17), datetime.date(2017, 12, 18)])
plt.legend()
plt.show()
This gives me the error
Blockquote AttributeError: module 'matplotlib.pyplot' has no attribute 'set_xlim'
I really want my graph to show the timestamp to be from 2017-12-17 22:00:00 to latest time.
Sample of the data looks like:
print(prices['Close']
2017-12-18 07:13:00 3.030000e-06
2017-12-18 07:14:00 3.020000e-06
2017-12-18 07:15:00 3.030000e-06
2017-12-18 07:16:00 3.040000e-06
Thanks