In [1]:
%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 [31]:
x = np.random.rand(100)
y = np.random.rand(100)
plt.scatter(x, y, color='orange', s=70, alpha=0.8)
plt.xlabel('X')
plt.ylabel('Y')
plt.title('X v. Y Scatter')
Out[31]:
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [19]:
x = np.random.rand(100)
plt.hist(x, bins=25, color='green')
plt.xlabel('X')
plt.ylabel('Y(X)')
plt.title('Random Histogram')
Out[19]:
In [ ]: