File: plot5a.py

package info (click to toggle)
scitools 0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 17,252 kB
  • ctags: 2,871
  • sloc: python: 28,744; sh: 112; makefile: 15
file content (14 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
"""Plot rows of a matrix object."""
from scitools.std import *

m = mat([[1,2,5], [3,-1,0], [4, 5, 5]])
x = range(m.shape[0])
for i in range(m.shape[0]):
    y = m[i,:]
    plot(x, array(y), 'r-', legend='row %d' % i)
    hold('on')
title('Plot of the rows of a matrix object')
plot([1,3,5],[4,4,4],'b-')
hardcopy('tmp5.eps')
raw_input('Press Return key to quit: ')