8000 Add a test for multiline text with usetex · jklymak/matplotlib@4f8e20f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f8e20f

Browse files
committed
Add a test for multiline text with usetex
1 parent bcd8232 commit 4f8e20f

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Loading

lib/matplotlib/tests/test_usetex.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,21 @@ def test_mathdefault():
6464
fig.canvas.draw()
6565

6666

67+
@image_comparison(['eqnarray.png'])
68+
def test_multiline_eqnarray():
69+
text = (
70+
r'\begin{eqnarray*}'
71+
r'foo\\'
72+
r'bar\\'
73+
r'baz\\'
74+
r'\end{eqnarray*}'
75+
)
76+
77+
fig = plt.figure(figsize=(1, 1))
78+
fig.text(0.5, 0.5, text, usetex=True,
79+
horizontalalignment='center', verticalalignment='center')
80+
81+
6782
@pytest.mark.parametrize("fontsize", [8, 10, 12])
6883
def test_minus_no_descent(fontsize):
6984
# Test special-casing of minus descent in DviFont._height_depth_of, by

0 commit comments

Comments
 (0)
0