source: tools/demos/matplotdemo2.py @ 361

Last change on this file since 361 was 39, checked in by ole, 20 years ago

Matplot demos

File size: 294 bytes
Line 
1from matplotlib.matlab import *
2
3def f(t):
4    s1 = cos(2*pi*t)
5    e1 = exp(-t)
6    return multiply(s1,e1)
7
8t1 = arange(0.0, 5.0, 0.1)
9t2 = arange(0.0, 5.0, 0.02)
10
11figure(1)
12subplot(211)
13plot(t1, f(t1), 'bo', t2, f(t2), 'k')
14
15subplot(212)
16plot(t2, cos(2*pi*t2), 'r--')
17show()
Note: See TracBrowser for help on using the repository browser.