Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 8b2b1fb157760a0d31e072e140388824 > files > 209

gri-2.8.0-1mdk.i586.rpm

<html>
<head>
<title>example4.gri</title>
</head>
<body bgcolor="#FFFFFF">
<pre>
<font color=#B22222># Example 4 -- Simple contour graph</font>

<font color=#B22222>#</font>
<font color=#B22222># Read x-grid; blank-line means stop reading.</font>
read grid x
0
.2
1

<font color=#B22222># Note that the x-grid was irregular.  The y-grid</font>
<font color=#B22222># in this example is regular, so we can just set</font>
<font color=#B22222># it to range from 10 to 20, incrementing by 2.5.</font>
set y grid 10 20 2.5
<font color=#B22222># Thus we now have a grid 3 wide and 5 high.  Let's</font>
<font color=#B22222># read the actual data now.</font>
read grid data
1 2 3
2 3 4
3 4 5
4 5 6
5 6 7
<font color=#B22222># Now draw contours (automatically set; we could</font>
<font color=#B22222># have done `draw contour 2' to draw contour fro</font>
<font color=#B22222># value 2 or `draw contour 1 10 2' to draw contours</font>
<font color=#B22222># ranging from 1 to 10 with an increment of 2.)</font>
draw contour
draw title <font color=#2F4F4F>"Example 4"</font>

</pre>
</body>
</html>