

.. _sphx_glr_gallery_pyplots_pyplot_mathtext.py:


===============
Pyplot Mathtext
===============





.. image:: /gallery/pyplots/images/sphx_glr_pyplot_mathtext_001.png
    :align: center





.. code-block:: python

    import numpy as np
    import matplotlib.pyplot as plt
    t = np.arange(0.0, 2.0, 0.01)
    s = np.sin(2*np.pi*t)

    plt.plot(t,s)
    plt.title(r'$\alpha_i > \beta_i$', fontsize=20)
    plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
    plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
             fontsize=20)
    plt.xlabel('time (s)')
    plt.ylabel('volts (mV)')
    plt.show()

**Total running time of the script:** ( 0 minutes  0.048 seconds)



.. only :: html

 .. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: pyplot_mathtext.py <pyplot_mathtext.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: pyplot_mathtext.ipynb <pyplot_mathtext.ipynb>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
