chickadee » s9fes-char-graphics » char-plot

char-plot LIST SYMBOL HEIGHT WDITH #!optional COMPR?procedure

Creates a character canvas (see make-canvas), marks the data points in LIST with #\X and draws a line through the points with #\-. SYMBOL will be used to label the X axis (on which the data points will be distributed).

HEIGHT and WDITH specify the physical dimensions of the char canvas. Its virtual dimensions will be computed in such a way that all data points can be displayed.

When the COMPR? (compression) argument is set to #t, then the X axis will start at the magnitude of the least data point instead of zero, so that the entire width of the canvas is available for distributing the supplied data points. The default is #t.

(char-plot '(0 1 2 3 4 5 6 7 8 9) 'foo 7 35 #f)</procedure>
=>
----------- foo --> -----------------
|                              -X   |
|                          --X-     |
|                   --X--X-         |
|                -X-                |
|         -X---X-                   |
|     --X-                          |
|X--X-                              |
----------- foo --> -----------------