C-PLOT

Scientific Graphics and Data Analysis

D.5. - contour



#  @(#)contour	4.2  03 May 1993 CSS
#  Certified Scientific Software's C-PLOT

re
# Calculate x and y grid
fn calc.4 n=1600; once G=40; once W=2*pi/G; \
 x=int(i/G)*W; y=(i%G)*W;

# Calculate z values
fn . z=sin(y)*cos(x-y)*exp((-x*x+y*y)*(W*W))
# Calculate contour
f2 contour.4 +sgv 15 zmin=-2 zmax=2.5
# Use a square window
wi 1
# Select tighter ranges
ra 0 6 0 6
# Use exact ranges
ty 2 2 0
sy L
# Plot it
zeq9999w

zzs

Here is the resulting contour plot: