In [1]:
%load_ext watermark
%watermark -a 'Hideki Tanaka' -u -d -v -p matplotlib,numpy
In [2]:
%matplotlib inline
In [3]:
import matplotlib.pyplot as plt
import numpy as np
In [4]:
np.random.seed(0)
In [5]:
x = np.random.randn(10000)
In [6]:
with plt.style.context('../styles/saihist.mplstyle'):
fig, ax = plt.subplots()
n, bins, patches = ax.hist(x, bins=50, normed=1, color="#3F5D7D")
ax.set_xlabel('x')
ax.set_ylabel('Probability')
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
plt.show()
In [7]:
fig.savefig('../images/mpl_saihist.png', dpi=80)