In [21]:
%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 [38]:
a = np.random.randn(2,100)
x = a[0,:]
y = a[1,:]
plt.figure(figsize=(5,5))
plt.scatter(x, y, color='green', alpha = 0.9)
plt.xlabel('Random Data')
plt.ylabel('y(Random Data)')
Out[38]:
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [46]:
b = np.random.randn(2,100)
x = b[0,:]
y = b[1,:]
plt.hist(x, bins = 10, color = 'orange', alpha = 0.9)
plt.xlabel('This is a histogram')
plt.ylabel('This is still a histogram')
Out[46]:
In [ ]: