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

Skip to content

Commit 0ba63f9

Browse files
committed
Changed pylab to plt.
1 parent 0a5314a commit 0ba63f9

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed
Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +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
76

87

98
def setfont(font):
@@ -14,10 +13,10 @@ def setfont(font):
1413
['Nimbus Roman No9 L ' + x for x in
1514
['', 'Italics (real italics for comparison)',
1615
'(slanted)', '(condensed)', '(extended)']]):
17-
pylab.text(0, y, setfont(font) + text)
16+
plt.text(0, y, setfont(font) + text)
1817

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')
18+
plt.ylim(-1, 5)
19+
plt.xlim(-0.2, 0.6)
20+
plt.setp(plt.gca(), frame_on=False, xticks=(), yticks=())
21+
plt.title('Usetex font effects')
22+
plt.savefig('usetex_fonteffects.pdf')

0 commit comments

Comments
 (0)