.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/text_labels_and_annotations/stix_fonts_demo.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_text_labels_and_annotations_stix_fonts_demo.py: ========== STIX Fonts ========== Demonstration of `STIX Fonts `_ used in LaTeX rendering. .. GENERATED FROM PYTHON SOURCE LINES 9-33 .. image:: /gallery/text_labels_and_annotations/images/sphx_glr_stix_fonts_demo_001.png :alt: stix fonts demo :class: sphx-glr-single-img .. code-block:: default import matplotlib.pyplot as plt circle123 = "\N{CIRCLED DIGIT ONE}\N{CIRCLED DIGIT TWO}\N{CIRCLED DIGIT THREE}" tests = [ r'$%s\;\mathrm{%s}\;\mathbf{%s}$' % ((circle123,) * 3), r'$\mathsf{Sans \Omega}\;\mathrm{\mathsf{Sans \Omega}}\;' r'\mathbf{\mathsf{Sans \Omega}}$', r'$\mathtt{Monospace}$', r'$\mathcal{CALLIGRAPHIC}$', r'$\mathbb{Blackboard\;\pi}$', r'$\mathrm{\mathbb{Blackboard\;\pi}}$', r'$\mathbf{\mathbb{Blackboard\;\pi}}$', r'$\mathfrak{Fraktur}\;\mathbf{\mathfrak{Fraktur}}$', r'$\mathscr{Script}$', ] fig = plt.figure(figsize=(8, len(tests) + 2)) for i, s in enumerate(tests[::-1]): fig.text(0, (i + .5) / len(tests), s, fontsize=32) plt.show() .. _sphx_glr_download_gallery_text_labels_and_annotations_stix_fonts_demo.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: stix_fonts_demo.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: stix_fonts_demo.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature Keywords: matplotlib code example, codex, python plot, pyplot `Gallery generated by Sphinx-Gallery `_