Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 566a7af commit 5484892Copy full SHA for 5484892
1 file changed
lib/matplotlib/tests/test_mathtext.py
@@ -280,3 +280,14 @@ def test_single_minus_sign():
280
def test_spaces(fig_test, fig_ref):
281
fig_test.subplots().set_title(r"$1\,2\>3\ 4$")
282
fig_ref.subplots().set_title(r"$1\/2\:3~4$")
283
+
284
285
+def test_math_to_image(tmpdir):
286
+ mathtext.math_to_image('$x^2$', str(tmpdir.join('example.png')))
287
+ mathtext.math_to_image('$x^2$', io.BytesIO())
288
289
290
+def test_mathtext_to_png(tmpdir):
291
+ mt = mathtext.MathTextParser('bitmap')
292
+ mt.to_png(str(tmpdir.join('example.png')), '$x^2$')
293
+ mt.to_png(io.BytesIO(), '$x^2$')
0 commit comments