Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c187867

Browse files
authored
Merge pull request #13916 from meeseeksmachine/auto-backport-of-pr-13850-on-v3.1.x
Backport PR #13850 on branch v3.1.x (Cleanup STIX Font Demo)
2 parents 488dc9c + 40cbf1d commit c187867

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/text_labels_and_annotations/stix_fonts_demo.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,29 @@
33
STIX Fonts Demo
44
===============
55
6+
Demonstration of `STIX Fonts <https://www.stixfonts.org/>`_ used in LaTeX
7+
rendering.
68
"""
79

810
import matplotlib.pyplot as plt
9-
import numpy as np
1011

1112

1213
circle123 = "\N{CIRCLED DIGIT ONE}\N{CIRCLED DIGIT TWO}\N{CIRCLED DIGIT THREE}"
1314

1415
tests = [
15-
r'$%s \mathrm{%s} \mathbf{%s}$' % ((circle123,) * 3),
16-
r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}}'
17-
r' \mathbf{\mathsf{Sans \Omega}}$',
16+
r'$%s\;\mathrm{%s}\;\mathbf{%s}$' % ((circle123,) * 3),
17+
r'$\mathsf{Sans \Omega}\;\mathrm{\mathsf{Sans \Omega}}\;'
18+
r'\mathbf{\mathsf{Sans \Omega}}$',
1819
r'$\mathtt{Monospace}$',
1920
r'$\mathcal{CALLIGRAPHIC}$',
20-
r'$\mathbb{Blackboard \pi}$',
21-
r'$\mathrm{\mathbb{Blackboard \pi}}$',
22-
r'$\mathbf{\mathbb{Blackboard \pi}}$',
23-
r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$',
21+
r'$\mathbb{Blackboard\;\pi}$',
22+
r'$\mathrm{\mathbb{Blackboard\;\pi}}$',
23+
r'$\mathbf{\mathbb{Blackboard\;\pi}}$',
24+
r'$\mathfrak{Fraktur}\;\mathbf{\mathfrak{Fraktur}}$',
2425
r'$\mathscr{Script}$',
2526
]
2627

27-
28-
fig = plt.figure(figsize=(8, (len(tests) * 1) + 2))
28+
fig = plt.figure(figsize=(8, len(tests) + 2))
2929
for i, s in enumerate(tests[::-1]):
3030
fig.text(0, (i + .5) / len(tests), s, fontsize=32)
3131

0 commit comments

Comments
 (0)