Skip to content

Instantly share code, notes, and snippets.

@rian-dolphin
Created November 3, 2021 21:47
Show Gist options
  • Save rian-dolphin/d3084f4c7237095c8e62573300687b36 to your computer and use it in GitHub Desktop.
Save rian-dolphin/d3084f4c7237095c8e62573300687b36 to your computer and use it in GitHub Desktop.
x = [dt.datetime.date(d) for d in df.index]
fig = plt.figure(figsize=(10,5))
plt.title('Walmart Quarterly Earnings')
plt.ylabel('Earnings (Billions)')
plt.grid(True)
plt.plot(x[:-len(predictions)],
df.Earnings[:-len(predictions)],
"b-")
plt.plot(x[-len(predictions):],
df.Earnings[-len(predictions):],
"b--",
label='True Values')
plt.plot(x[-len(predictions):],
predictions,
"r-",
label='Predicted Values')
plt.legend()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment