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 [32]:
a=np.random.randn(2,10)
x=a[0,:]
x
y=a[1,:]
y
plt.scatter(x,y,color='red')
plt.grid(True)
plt.box(False)
plt.xlabel('random x values')
plt.ylabel('random y values')
plt.title('TITLE')
Out[32]:
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [54]:
a=np.random.randn(1,10)
x=a[0,:]
plt.hist(x,bins=15,histtype='bar',color='green')
plt.title('MY HISTOGRAM')
plt.xlabel('RANDOM X VALUES')
plt.ylabel('FREQUENCY')
Out[54]:
In [ ]: