c
! www.simula.no/˜hpl
Plotting 2D scalar fields
from scitools.all import
*
x=y=linspace(-5,5,21)
xv, yv = ndgrid(x, y)
values = sin(sqrt(xv
**
2+yv
**
2))
surf(xv, yv, values)
-6
-4
-2
0
2
4
6
-6
-4
-2
0
2
4
6
-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
Numerical Python – p. 266/728
Kommentare zu diesen Handbüchern