pplot Module
Synopsis
Racket | (require iup/pplot) |
---|---|
CHICKEN | (require-extension iup-pplot) |
CHICKEN 5 | (require-library iup) |
Plotting support. Initializes the IUP PPlot library when loaded.
PPlot Control
(pplot #:<name> <value> ...) → ihandle?
Creates a plotting canvas.
Plotting Functions
(call-with-pplot [handle ihandle?] [proc (-> ihandle? any)] #:x-string? [x-string? any/c #f]) → any
Calls the given procedure with the given plotting canvas handle and ensures that the canvas is ready to receive data in the given x-axis mode. Returns whatever the given procedure returns.
(pplot-add! [handle ihandle?] [x (or/c string? real?)] [y real?] [sample-index (or/c integer? #f) #f] [index (or/c integer? #f) #f]) → void?
Adds a sample to the given plotting canvas. Whether x
must be a
string or a real number depends on the setting of the xdata-string?
argument to the call-with-pplot
invocation that created the dataset.
If sample-index
is #f
, the sample is appended to the
dataset and the call to pplot-add!
must be within the dynamic
context of a call to call-with-pplot
.
If sample-index
is a number, the sample is inserted into the
dataset before the given sample index. The call to pplot-add!
does not have to be within the dynamic context of a call to
call-with-pplot
in this case.
The dataset to which the new sample should be added may be specified explicitly
by its index through the index
argument. If the index
argument is false, the current dataset of the plotting canvas is used.
Auxiliary Functions
(pplot-x/y->pixel-x/y [handle ihandle?] [x real?] [y real?]) → (values integer? integer?)
Transforms plot coordinates into pixel coordinates.
(pplot-paint-to [handle ihandle?] [canvas canvas?]) → void?
Paints the plot's contents into a canvas other than the one belonging to the
plot control itself. canvas
should be a pointer to a canvas
object created using the CD graphics library.