%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
mu, sigma = 100, 15
x = mu + sigma * np.random.randn(10000)
n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75)
plt.xlabel('Smarts')
<matplotlib.text.Text at 0x108709b90>
plt.ylabel('Probability')
<matplotlib.text.Text at 0x108790890>
plt.title('Histogram of IQ')
<matplotlib.text.Text at 0x108937650>
plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
<matplotlib.text.Text at 0x1089b9390>
plt.axis([40, 160, 0, 0.03])
[40, 160, 0, 0.03]
plt.savefig("example_plot.eps")
<matplotlib.figure.Figure at 0x1089c0250>