A 2D plotting library for Common Lisp using Matplotlib.
Common Lisp
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
t
.gitignore
.travis.yml
LICENSE
README.md Update README Jun 30, 2017
matplotlib-cl-test.asd
matplotlib-cl.asd

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)