File: fill_demo.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 (24 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python

"""Examples taken from fill_demo.py and fill_demo2.py in Matplotlib."""

from scitools.std import *

t = linspace(0.0, 1.0, 101)
s = sin(2*2*pi*t)

fill(t, s*exp(-5*t), 'r', grid=True)

figure()
t = linspace(0.0,3.0,301)
s = sin(2*pi*t)
c = sin(4*pi*t)
fill(t, s, 'b', t, c, 'g', opacity=0.2)

raw_input('Press Return key to quit: ')

legend('domain1', 'domain2')
clf()

plot(t,s,legend='a')
plot(t,s+2,legend='b')