In [50]:
%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 [51]:
?plt.scatter()
In [60]:
from matplotlib import markers
markers.MarkerStyle.markers.keys()
x = np.random.rand(100)
y = np.random.rand(100)
plt.scatter(x, y, label = 'The Dots', c = u'r', marker = u'o')
plt.grid(True)
plt.box(False)
plt.xlabel('The X-Axis')
plt.ylabel('The Y-Axis')
plt.legend(loc=0) ##I have no idea if you wanted a legend... but I tried to find the best place for it
Out[60]:
Learn how to use Matplotlib's plt.hist function to make a 1d histogram.
np.random.randn.
In [66]:
data = np.random.rand(100)
data
?plt.hist()
plt.hist(data, bins = 30, histtype = u'step', color = 'g')
plt.box(True)
plt.xlabel('The X-Axis for Histograms')
plt.ylabel('The Y-Axis for Histograms')
Out[66]:
In [ ]: