Skip to content

Instantly share code, notes, and snippets.

@maxdevblock
Created December 2, 2022 12:00
Show Gist options
  • Save maxdevblock/b619d25d681d451d00755438dc5a2317 to your computer and use it in GitHub Desktop.
Save maxdevblock/b619d25d681d451d00755438dc5a2317 to your computer and use it in GitHub Desktop.
import numpy as np
import matplotlib.pyplot as plt
X = np.arange(20).astype(float)
Y = X*2
X += np.random.random(size=X.size)*5
Y += np.random.random()*5
plt.plot(X, Y, "o", label="observations")
plt.legend(loc="upper left", bbox_to_anchor=(1,1))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment