Matplotlib 2.0.0rc2 is available

Install the release candidate now!



This Page

pylab_examples example code: titles_demo.pyΒΆ

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

#!/usr/bin/env python
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.title('Center Title')
plt.title('Left Title', loc='left')
plt.title('Right Title', loc='right')

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