11 Plot
The mrlib/plot library provides a simple tool for plotting data values to a device context.
| |||||
connected? : any/c | |||||
min-x : real? | |||||
max-x : real? | |||||
min-y : real? | |||||
max-y : real? |
The points field contains the data values to plot, and connected? indicates whether the points are connected by a line. The pen field provides a pen for plotting points/lines. The remaining fields determine the plotting area within a drawing context.
| |||||||||||||||||||||||||||||||||||||||||||||
axis-pen : (is-a?/c pen) | |||||||||||||||||||||||||||||||||||||||||||||
grid? : any/c | |||||||||||||||||||||||||||||||||||||||||||||
grid-pen : (is-a?/c pen) | |||||||||||||||||||||||||||||||||||||||||||||
x-axis-label : string? | |||||||||||||||||||||||||||||||||||||||||||||
y-axis-label : string? |
Configures a plot. The grid? field determines whether to draw a grid at axis markings, and the x-axis-marking and y-axis-marking lists supply locations for marks on each axis. The other fields are self-explanatory.
setup : plot-setup? |
Draws the data-sets in data into the given dc. Uses drawing-context coordinates in data-sets that will accommodate all of the data sets.