.. _sphx_glr_gallery_pyplots_pyplot_text.py: =========== Pyplot Text =========== .. image:: /gallery/pyplots/images/sphx_glr_pyplot_text_001.png :align: center .. code-block:: python import numpy as np import matplotlib.pyplot as plt # Fixing random state for reproducibility np.random.seed(19680801) mu, sigma = 100, 15 x = mu + sigma * np.random.randn(10000) # the histogram of the data n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75) plt.xlabel('Smarts') plt.ylabel('Probability') plt.title('Histogram of IQ') plt.text(60, .025, r'$\mu=100,\ \sigma=15$') plt.axis([40, 160, 0, 0.03]) plt.grid(True) plt.show() **Total running time of the script:** ( 0 minutes 0.039 seconds) .. only :: html .. container:: sphx-glr-footer .. container:: sphx-glr-download :download:`Download Python source code: pyplot_text.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: pyplot_text.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_