Plotting on Character Devices
=============================
`(require 'charplot)'
The plotting procedure is made available through the use of the
`charplot' package. `charplot' is loaded by inserting `(require
'charplot)' before the code that uses this procedure.
- Variable: charplot:height
The number of rows to make the plot vertically.
- Variable: charplot:width
The number of columns to make the plot horizontally.
- Procedure: plot! coords x-label y-label
COORDS is a list of pairs of x and y coordinates. X-LABEL and
Y-LABEL are strings with which to label the x and y axes.
Example:
(require 'charplot)
(set! charplot:height 19)
(set! charplot:width 45)
(define (make-points n)
(if (zero? n)
'()
(cons (cons (/ n 6) (sin (/ n 6))) (make-points (1- n)))))
(plot! (make-points 37) "x" "Sin(x)")
-|
Sin(x) ______________________________________________
1.25|- |
| |
1|- **** |
| ** ** |
0.75|- * * |
| * * |
0.5|- * * |
| * |
0.25|- * |
| * * |
0|-------------------*--------------------------|
| * |
-0.25|- * * |
| * * |
-0.5|- * |
| * * |
-0.75|- * * |
| ** ** |
-1|- **** |
|____________:_____._____:_____._____:_________|
x 2 4 6
- Procedure: plot-function! func x1 x2
- Procedure: plot-function! func x1 x2 npts
Plots the function of one argument FUNC over the range X1 to X2.
If the optional integer argument NPTS is supplied, it specifies
the number of points to evaluate FUNC at.