Skip to content
A 2D plotting library for Common Lisp using Matplotlib.
Common Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Change to use run* instead of run Jun 22, 2017
t Fix num of plans Jun 22, 2017
.gitignore Initial commit Jun 20, 2017
.travis.yml The test for SBCL failed. I don't know why... Jun 30, 2017
LICENSE Initial commit Jun 20, 2017
README.md Update README Jun 30, 2017
matplotlib-cl-test.asd Add tests Jun 21, 2017
matplotlib-cl.asd Add tests Jun 21, 2017

README.md

matplotlib-cl

MIT License Build Status Quicklisp dist

matplotlib-cl is a 2D plotting library for Common Lisp, which provides a simple interface to Matplotlib plotting API.

Usage

Most pyplot functions are avilable. You can refer to the parameter plt:*pyplot-functions* to get the complete list of availble APIs. See also documantation of pyplot for the detailed usage of each functions.

Requirements

matplotlib-cl depends on both Python and Matplotlib. Please confirm both of these are installed on your PC.

On Debian-like systems:
$ sudo apt-get install python-matplotlib python2.7-dev

Or use pip:
$ sudo pip install matplotlib

Note: Python3.x is NOT supported...

Example

Here is a simple example ported from tutorial of Matplotlib.

(ql:quickload :matplotlib-cl :silent t)

(defvar *t* (loop for x from 0 below 2 by 0.01 collect x))
(defvar *s* (mapcar (lambda (x) (1+ (sin (* 2 PI x)))) *t*))

(defun main ()
  (plt:plot *t* *s*)

  (plt:xlabel "time (s)")
  (plt:ylabel "voltage (mV)")
  (plt:title "About as simple as it gets, folks")
  (plt:grid t)
  (plt:savefig "test.png")
  (plt:show))

License

Licensed under MIT License.

Author

TANI Kojiro (kojiro0531@gmail.com)

You can’t perform that action at this time.