File tree 3 files changed +10
-2
lines changed
baseline_images/test_usetex
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():
1544
1544
'matplotlib.tests.test_type1font' ,
1545
1545
'matplotlib.tests.test_ttconv' ,
1546
1546
'matplotlib.tests.test_units' ,
1547
+ 'matplotlib.tests.test_usetex' ,
1547
1548
'matplotlib.tests.test_widgets' ,
1548
1549
'matplotlib.tests.test_cycles' ,
1549
1550
'matplotlib.tests.test_preprocess_data' ,
Original file line number Diff line number Diff line change 3
3
4
4
import matplotlib
5
5
from matplotlib .testing .decorators import image_comparison
6
+ from matplotlib .compat .subprocess import check_output
6
7
import matplotlib .pyplot as plt
7
8
8
9
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 )
10
13
def test_usetex ():
14
+ canusetex = matplotlib .checkdep_usetex (True )
15
+ if not canusetex :
16
+ from nose import SkipTest
17
+ raise SkipTest ('Cannot run usetex_test' )
11
18
matplotlib .rcParams ['text.usetex' ] = True
12
19
fig = plt .figure ()
13
20
ax = fig .add_subplot (111 )
@@ -16,7 +23,7 @@ def test_usetex():
16
23
# \left[ ... \right\} draw some variable-height characters,
17
24
# \sqrt and \frac draw horizontal rules, \mathrm changes the font
18
25
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\}$ ' ,
20
27
fontsize = 24 )
21
28
ax .set_xticks ([])
22
29
ax .set_yticks ([])
You can’t perform that action at this time.
0 commit comments