Skip to content

Instantly share code, notes, and snippets.

@duhaime
Created January 7, 2020 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duhaime/4df5b5778e1197fbfacf1172130ad307 to your computer and use it in GitHub Desktop.
Save duhaime/4df5b5778e1197fbfacf1172130ad307 to your computer and use it in GitHub Desktop.
seed data 2d
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
side = 85
n = side * side
np.random.seed(0)
xy = np.random.uniform(low=-1, high=+1, size=(n, 2))
xy = np.cumsum(xy, axis=0)
xy -= xy.min(axis=0)
xy /= xy.max(axis=0)
xy *= (side - 1)
x, y = xy.T
plt.scatter(x, y, s=0.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment