Matplotlib 2.0.0rc1 is available

Install the release candidate now!



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)