Skip to content

koji-kojiro/matplotlib-cl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

A 2D plotting library for Common Lisp using Matplotlib.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published