Skip to content

Instantly share code, notes, and snippets.

@animesh-agarwal
Last active August 17, 2019 11:13
Show Gist options
  • Save animesh-agarwal/d8d6a68c1e5a2d5db265d6feb2b39765 to your computer and use it in GitHub Desktop.
Save animesh-agarwal/d8d6a68c1e5a2d5db265d6feb2b39765 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(0)
x = 2 - 3 * np.random.normal(0, 1, 20)
y = x - 2 * (x ** 2) + 0.5 * (x ** 3) + np.random.normal(-3, 3, 20)
plt.scatter(x,y, s=10)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment