Note: This is taken from the Chicken Wiki, where a more recent version could be available.

octave

Description

Octave extension for Chicken and Gambit Scheme.

Author

Pierre-Alexandre Fournier

Requirements

None

Download

octave.egg

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.

NEW! Version 0.4 now supports error bars plots (octave:errorbar).

NEW! Version 0.3 now supports over 50 file formats to save your graphs, including postscript, png, gif, and jpeg.

Here are some screenshots.

Download scheme code directly (version 0.4): octave.scm

tarball for Gambit (version 0.4): gambit-octave-0.4.tar.gz

Usage

To start:

 (octave:start)

To stop:

 (octave:stop)

Example

<example> <init>(use posix octave)</init> <expr> (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) </expr> </example>

Limitations

This simple GNU/Octave interface has some limitations:

Changelog

License

The octave egg is released under the BSD license.