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

Skip to content

Commit f569210

Browse files
author
Paul Barret
committed
Added more font attributes to example.
svn path=/trunk/matplotlib/; revision=275
1 parent d98d960 commit f569210

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

examples/fonts_demo.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
### Show family options
1111

12-
#family = ['serif', 'sans-serif', 'cursive', 'serif', 'monospace']
13-
family = ['serif', 'sans-serif', 'monospace']
12+
family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace']
1413

1514
font1 = font0.copy()
1615
font1.set_size('large')
@@ -20,9 +19,11 @@
2019

2120
yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5]
2221

23-
for k in range(3):
22+
for k in range(5):
2423
font = font0.copy()
2524
font.set_family(family[k])
25+
if k == 2:
26+
font.set_name('Script MT')
2627
t = text(-0.8, yp[k], family[k], fontproperties=font,
2728
horizontalalignment='center', verticalalignment='center')
2829

@@ -33,7 +34,7 @@
3334
t = text(-0.4, 0.9, 'style', fontproperties=font1,
3435
horizontalalignment='center', verticalalignment='center')
3536

36-
for k in range(2):
37+
for k in range(3):
3738
font = font0.copy()
3839
font.set_family('sans-serif')
3940
font.set_style(style[k])

0 commit comments

Comments
 (0)