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 [4]:
# This assignment wasn't graded for some reason, having a 0.0/0.0 score. Resubmitting the assignment for grading on this one
# as well as on the Theory and Practice problems.
plt.xlabel('Random x-data')
plt.ylabel('Random y-data')
plt.title('Random Numbers')
plt.scatter(np.random.randn(50),np.random.randn(50), color='b', alpha=.75);
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [5]:
bins=20
plt.hist(np.random.randn(1000),bins, color='r')
plt.ylabel('Occurrence of number')
plt.xlabel('Random Numbers')
plt.title('Random Number Histogram');
In [ ]: