Created
January 7, 2020 20:43
-
-
Save duhaime/4df5b5778e1197fbfacf1172130ad307 to your computer and use it in GitHub Desktop.
seed data 2d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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