Menu

[r540]: / trunk / htdocs / examples / font_properties_demo.py  Maximize  Restore  History

Download this file

19 lines (14 with data), 395 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
from matplotlib.matlab import *
font = {'family' : 'monospace',
'weight' : 'bold',
'size' : 'larger',
}
plot(arange(20))
title('something')
rc('font', **font) # pass in the font dict as kwargs
for i in range(1,15,2):
text(i, i, 'label %d'%i, color='g') # uses font
rcdefaults() # restore default
xlabel('hi mom')
show()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.