.. _pylab_examples-titles_demo:

pylab_examples example code: titles_demo.py
===========================================



.. plot:: /home/tcaswell/source/p/matplotlib/doc/mpl_examples/pylab_examples/titles_demo.py

::

    """
    matplotlib can display plot titles centered, flush with the left side of
    a set of axes, and flush with the right side of a set of axes.
    
    """
    import matplotlib.pyplot as plt
    
    plt.plot(range(10))
    
    plt.title('Center Title')
    plt.title('Left Title', loc='left')
    plt.title('Right Title', loc='right')
    
    plt.show()
    

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