Saihist Style in matplotlib


In [1]:
%load_ext watermark
%watermark -a 'Hideki Tanaka' -u -d -v -p matplotlib,numpy


Hideki Tanaka 
last updated: 2016-03-05 

CPython 3.5.1
IPython 4.1.1

matplotlib 1.5.1
numpy 1.10.4

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)