.. _statistics-errorbar_demo:

statistics example code: errorbar_demo.py
=========================================



.. plot:: /home/travis/build/jenshnielsen/matplotlib/doc/mpl_examples/statistics/errorbar_demo.py

::

    """
    Demo of the errorbar function.
    """
    import numpy as np
    import matplotlib.pyplot as plt
    
    # example data
    x = np.arange(0.1, 4, 0.5)
    y = np.exp(-x)
    
    plt.errorbar(x, y, xerr=0.2, yerr=0.4)
    plt.show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)