From b7d85ce7ff0f4ebac6d0bff0e2ec3003541f44b3 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Tue, 2 Apr 2019 22:24:22 +0200 Subject: [PATCH] Cleanup STIX Font Demo --- .../stix_fonts_demo.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/text_labels_and_annotations/stix_fonts_demo.py b/examples/text_labels_and_annotations/stix_fonts_demo.py index de817db34833..c9f263e8c27a 100644 --- a/examples/text_labels_and_annotations/stix_fonts_demo.py +++ b/examples/text_labels_and_annotations/stix_fonts_demo.py @@ -3,29 +3,29 @@ STIX Fonts Demo =============== +Demonstration of `STIX Fonts `_ used in LaTeX +rendering. """ import matplotlib.pyplot as plt -import numpy as np 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'$%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'$\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) * 1) + 2)) +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)