File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed
baseline_images/test_usetex Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1544,6 +1544,7 @@ def _jupyter_nbextension_paths():
15441544 'matplotlib.tests.test_type1font' ,
15451545 'matplotlib.tests.test_ttconv' ,
15461546 'matplotlib.tests.test_units' ,
1547+ 'matplotlib.tests.test_usetex' ,
15471548 'matplotlib.tests.test_widgets' ,
15481549 'matplotlib.tests.test_cycles' ,
15491550 'matplotlib.tests.test_preprocess_data' ,
Original file line number Diff line number Diff line change 33
44import matplotlib
55from matplotlib .testing .decorators import image_comparison
6+ from matplotlib .compat .subprocess import check_output
67import matplotlib .pyplot as plt
78
89
9- @image_comparison (baseline_images = ['test_usetex' ], extensions = ['pdf' , 'png' ])
10+ @image_comparison (baseline_images = ['test_usetex' ],
11+ extensions = ['pdf' , 'png' ],
12+ tol = 0.3 )
1013def test_usetex ():
14+ canusetex = matplotlib .checkdep_usetex (True )
15+ if not canusetex :
16+ from nose import SkipTest
17+ raise SkipTest ('Cannot run usetex_test' )
1118 matplotlib .rcParams ['text.usetex' ] = True
1219 fig = plt .figure ()
1320 ax = fig .add_subplot (111 )
@@ -16,7 +23,7 @@ def test_usetex():
1623 # \left[ ... \right\} draw some variable-height characters,
1724 # \sqrt and \frac draw horizontal rules, \mathrm changes the font
1825 r'\LaTeX\ $\left[\int\limits_e^{2e}'
19- r'\sqrt\frac{\log^3 x}{x}\,\mathrm{d}x \right\}' ,
26+ r'\sqrt\frac{\log^3 x}{x}\,\mathrm{d}x \right\}$ ' ,
2027 fontsize = 24 )
2128 ax .set_xticks ([])
2229 ax .set_yticks ([])
You can’t perform that action at this time.
0 commit comments