Newer
Older
# Exercise 2.3.2
# (requires data from exercise 2.3.1 so will run that script first)
from ex2_3_1 import *
from matplotlib.pyplot import figure, hist, show, subplot, xlabel, ylim
figure(figsize=(8, 7))
u = np.floor(np.sqrt(M))
v = np.ceil(float(M) / u)
subplot(int(u), int(v), i + 1)
hist(X[:, i], color=(0.2, 0.8 - i * 0.2, 0.4))
print("Ran Exercise 2.3.2")