matplotlib-cl is a 2D plotting library for Common Lisp, which provides a simple interface to Matplotlib plotting API.
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.
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...
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))
Licensed under MIT License.