source:
tools/demos/matplotdemo2.py
@
2225
Last change on this file since 2225 was 39, checked in by ole, 20 years ago | |
---|---|
File size: 294 bytes |
Rev | Line | |
---|---|---|
[39] | 1 | from matplotlib.matlab import * |
2 | ||
3 | def f(t): | |
4 | s1 = cos(2*pi*t) | |
5 | e1 = exp(-t) | |
6 | return multiply(s1,e1) | |
7 | ||
8 | t1 = arange(0.0, 5.0, 0.1) | |
9 | t2 = arange(0.0, 5.0, 0.02) | |
10 | ||
11 | figure(1) | |
12 | subplot(211) | |
13 | plot(t1, f(t1), 'bo', t2, f(t2), 'k') | |
14 | ||
15 | subplot(212) | |
16 | plot(t2, cos(2*pi*t2), 'r--') | |
17 | show() |
Note: See TracBrowser
for help on using the repository browser.