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

Skip to content

Commit 31e689a

Browse files
committed
Merge pull request #4632 from ericmjl/import-changes-usetex_fonteffects.py
Changed pylab to plt.
2 parents 4c396ac + b4ff2dd commit 31e689a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# This script demonstrates that font effects specified in your pdftex.map
22
# are now supported in pdf usetex.
33

4-
import matplotlib
4+
import matplotlib.pyplot as plt
55
matplotlib.rc('text', usetex=True)
6-
import pylab
7-
86

97
def setfont(font):
108
return r'\font\a %s at 14pt\a ' % font
@@ -14,10 +12,10 @@ def setfont(font):
1412
['Nimbus Roman No9 L ' + x for x in
1513
['', 'Italics (real italics for comparison)',
1614
'(slanted)', '(condensed)', '(extended)']]):
17-
pylab.text(0, y, setfont(font) + text)
15+
plt.text(0, y, setfont(font) + text)
1816

19-
pylab.ylim(-1, 5)
20-
pylab.xlim(-0.2, 0.6)
21-
pylab.setp(pylab.gca(), frame_on=False, xticks=(), yticks=())
22-
pylab.title('Usetex font effects')
23-
pylab.savefig('usetex_fonteffects.pdf')
17+
plt.ylim(-1, 5)
18+
plt.xlim(-0.2, 0.6)
19+
plt.setp(plt.gca(), frame_on=False, xticks=(), yticks=())
20+
plt.title('Usetex font effects')
21+
plt.savefig('usetex_fonteffects.pdf')

0 commit comments

Comments
 (0)