Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
octave
Description
Octave extension for Chicken and Gambit Scheme.
Author
Requirements
GNU/Octave and gnuplot have to be installed.
With Chicken Scheme, the posix extension is needed:
(use posix)
Documentation
The octave egg provides a simple interface for GNU/Octave use in Chicken and Gambit Scheme systems. The egg is meant to be used as a graph utility using the GNU/Octave interface to gnuplot. Comments and contributions are welcomed.
Here are some screenshots.
Usage
To start:
(octave:start)
To stop:
(octave:stop)
Example
(use posix octave) (octave:start) (octave:version) (octave:plot '(1 2 3) '(3 2 1)) (octave:title "Simple plot") (octave:xlabel "xbar") (octave:ylabel "ybar") (octave:grid "on") (octave:grid "off") (octave:semilogx '(1 2 3) '(3 2 1)) (octave:title "SemilogX") (octave:semilogy '(1 2 3) '(3 2 1)) (octave:title "SemilogY") (octave:figure) (octave:loglog '(1 1.5 211.8) '(2 2.3 21.0) '(1 1.5 222.3) '(1.2 2.4 2222.0)) (octave:figure) (octave:polar (iota 50) (iota 50)) (octave:title "Rose") octave:supported-file-types ;;; to see supported file formats (octave:save-plot-to "png" "rose.png") (octave:figure) (octave:title "Bar") (octave:bar (iota 5) (iota 5)) (octave:figure) (octave:title "Mesh 3D") (octave:mesh (list (iota 4) (iota 4 2))) (octave:figure) (octave:title "ImageSC") (octave:imagesc (list (iota 4) (iota 4 2))) (octave:figure) (octave:title "Mesh XYZ") (octave:mesh-xyz (iota 3) (iota 2) (list (iota 3) (iota 3))) (octave:save-plot-to "postscript" "foo.ps") (octave:figure) (octave:title "Y Error bars") (octave:errorbar (list 1.1 2.1 3.1 4.1) (list 1.1 2.1 3.1 4.1) (list 2 3 4 3)) (octave:figure) (octave:title "Boxes Error bars") (octave:errorbar (list 1 2 3 4) (list 2 3 2 3) (list .1 .2 .2 .1) (list .1 .2 .2 .2) (list .2 .1 .2 .2) (list .4 .3 .2 .1) "'#~>'") (octave:stop)
Limitations
This simple GNU/Octave interface has some limitations:
- We suggest you don't use this module if you want to plot more than 10000 points in a graph. Points are passed in a string and the pipe is very slow when you send a lot of points. Write a wrapping function and subsample your data before plotting if you have more than 10000 points to plot.
- In some cases, like when you try to send 100000 points to a graph function, the GNU/Octave process may crash leaving a gnuplot process running. If this happens you should kill the gnuplot process manually.
Changelog
- 0.4: Changed octave:stop. Added octave:stairs and octave:errorbar functions.
- 0.3: Access to all Octave's supported file types to save the current graph. Added octave:legend function. Checks for argument lengths in 2d plot functions. Replaced gset with __gnuplot_set__ internal Octave function.
- 0.2: Added 3d plotting functions (octave:mesh-xyz, octave:contour, octave:imagesc) and an interface version (octave:version) function.
- 0.1: Initial version.
License
The octave egg is released under the BSD license.