Created
May 13, 2020 21:44
-
-
Save radeksvarz/6788654f69d68642c0b20d72b0e7519c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import matplotlib.pyplot as plt | |
from pylab import rand | |
from random import randint | |
import numpy as np | |
# random.randint(a, b) # Return a random integer N such that a <= N <= b. | |
# numpy.random.randint(low, high=None, size=None, dtype='l') # Return random integers from low (inclusive) to high (exclusive). | |
#Z = np.random.randint(4, 9+1, 1000) | |
X = np.random.randint(0, 6+1, size=100) | |
Y = np.array([ randint(0, 6-xi) for xi in X]) | |
plt.scatter(X,Y, color='r', alpha=0.1) | |
plt.xlabel("X") | |
plt.ylabel("Y") | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment