You are reading an old version of the documentation (v1.4.2). For the latest version see

Previous topic

style_sheets Examples

Next topic

style_sheets example code:

This Page

style_sheets example code: plot_bmh.pyΒΆ

(Source code, png, hires.png, pdf)

This example demonstrates the "bmh" style, which is the design used in the
Bayesian Methods for Hackers online book.
from numpy.random import beta
import matplotlib.pyplot as plt'bmh')

def plot_beta_hist(a, b):
    plt.hist(beta(a, b, size=10000), histtype="stepfilled",
             bins=25, alpha=0.8, normed=True)

plot_beta_hist(10, 10)
plot_beta_hist(4, 12)
plot_beta_hist(50, 12)
plot_beta_hist(6, 55)

Keywords: python, matplotlib, pylab, example, codex (see Search examples)