You are looking at historical revision 38365 of this page. It may differ significantly from its current revision.
slib-charplot
Description
A port of the SLIB character plotting library. For SLIB documentation see charplot.
Documentation
Note that the SLIB documentation describes charplot:dimensions. This, and other plot defining variables, are not exported here. Rather parameters are provided.
Usage
(import slib-charplot)
frame-dimensions
[procedure] (frame-dimensions [DIMS]) -> (or boolean (list exact-integer exact-integer))A list of the maximum height (number of lines) and maximum width (number of columns) for the graph, its scales, and labels.
The default value uses the output-port-height and output-port-width of current-output-port at plot time.
- DIMS
- (or #f (list exact-integer exact-integer)) ;(Height-rows Width-columns), default #f
parameter replacing charplot:dimensions.
frame-left-margin
[procedure] (frame-left-margin [WID]) -> exact-integer- WID
- (or #f exact-integer) ;Width-columns, initial 12, default, & minimum, 2.
parameter replacing charplot:left-margin.
xborder-char
yborder-char
xaxis-char
yaxis-char
xtick-char
bar-char
[procedure] (xborder-char [CHAR]) -> char[procedure] (yborder-char [CHAR]) -> char
[procedure] (xaxis-char [CHAR]) -> char
[procedure] (yaxis-char [CHAR]) -> char
[procedure] (xtick-char [CHAR]) -> char
[procedure] (bar-char [CHAR]) -> char
parameters replacing char:xborder, char:yborder, char:xaxis, char:yaxis, char:xtick & char:bar.
curves-chars
[procedure] (curves-chars [CHARS]) -> exact-integer- CHARS
- (or #f string) ;characters to use for the plot curve, #f uses the default set.
parameter replacing char:curves.
plot
[procedure] (plot COORDS X-LABEL Y-LABEL [HISTOGRAM?])COORDS is a list or vector of coordinates, lists of x and y coordinates. X-LABEL and Y-LABEL are strings with which to label the x and y axes.
- COORDS
- (or list vector) ; elements, coordinates, are (list X Y), ex: #(... (12 21) ...).
- X-LABEL
- string ; x axis label.
- Y-LABEL
- string ; y axis label.
- HISTOGRAM?
- boolean ; line or filled graph.
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.
- FUNC
- (number -> number) ; function to plot.
- X1
- number ; plot range start.
- X2
- number ; plot range end.
- NPTS
- exact-integer ; number of points to evaluate FUNC.
histograph
[procedure] (histograph DATA LABEL)Creates and displays a histogram of the numerical values contained in vector or list DATA. LABEL is a string.
- DATA
- (or list vector) ; elements are number.
- LABEL
- string ; plot label.
Author
Aubrey Jaffer
Maintainer
Requirements
Version history
- 1.0.0
- C5 release.
License
Copyright (C) 1992, 1993, 2001, 2003 Aubrey Jaffer
Permission to copy this software, to modify it, to redistribute it, to distribute modified versions, and to use it for any purpose is granted, subject to the following restrictions and understandings.
1. Any copy made of this software must include this copyright notice in full.
2. I have made no warranty or representation that the operation of this software will be error-free, and I am under no obligation to provide any services, by way of maintenance, update, or otherwise.
3. In conjunction with products arising from the use of this material, there shall be no use of my name in any advertising, promotional, or sales literature without prior written consent in each case.