In [57]:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
Learn how to use Matplotlib's plt.scatter function to make a 2d scatter plot.
np.random.randn.
In [58]:
plt.figure(figsize=(10,8))
plt.scatter(np.random.randn(100),np.random.randn(100),s=50,c='b',marker='d',alpha=.7)
plt.xlabel('x-coordinate')
plt.ylabel('y-coordinate')
plt.title('100 Random Points')
Out[58]:
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [59]:
plt.figure(figsize=(10,8))
p=plt.hist(np.random.randn(100000),bins=50,color='g')
plt.xlabel('value')
plt.ylabel('frequency')
plt.title('Distrobution 100000 Random Points with mean of 0 and variance of 1')
Out[59]: