You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Applications are open for the 2018 John Hunter Matplotlib Summer Fellowship. Apply now!
Version 2.2.2.post1772+gd9240e24b
matplotlib
Fork me on GitHub

Related Topics

Titles DemoΒΆ

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.

../../_images/sphx_glr_titles_demo_001.png
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: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery