Menu

[r3358]: / trunk / htdocs / examples / line_styles.py  Maximize  Restore  History

Download this file

27 lines (22 with data), 730 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
from pylab import *
t = arange(0.0, 3.0, 0.05)
s = sin(2*pi*t)
styles = ('-', '--', ':', '.', 'o', '^', 'v', '<', '>', 's', '+')
colors = ('b', 'g', 'r', 'c', 'm', 'y', 'k')
axisNum = 0
for row in range(5):
for col in range(4):
s = sin(2*pi*t)
axisNum += 1
subplot(5,4,axisNum)
style = styles[axisNum % len(styles) ]
color = colors[axisNum % len(colors) ]
plot(t,s, style + color)
# turn off the ticklabels if not first row or first col
if not gca().is_first_col():
setp(gca(), 'yticklabels', [])
if not gca().is_last_row():
setp(gca(), 'xticklabels', [])
#savefig('line_styles', dpi=300)
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.