Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created August 24, 2021 12:19
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save quantra-go-algo/cb8d959a76eb6735f0c61ec31c92c29a to your computer and use it in GitHub Desktop.
Create Scatter Plot
####################################################
## A scatter plot of X (spy) and Y (ko) to examine the nature of their relationship visually
plt.figure(figsize = (10, 6))
plt.rcParams.update({'font.size': 14})
plt.xlabel("SPY returns")
plt.ylabel("KO returns")
plt.title("Scatter plot of daily returns (Jul 2018 to Jul 2021)")
plt.scatter(df['spy'], df['ko'])
plt.show()
####################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment