Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/komi1230/kai
A high-level plotter library for Common Lisp.
https://github.com/komi1230/kai
common-lisp roswell
Last synced: about 1 month ago
JSON representation
A high-level plotter library for Common Lisp.
- Host: GitHub
- URL: https://github.com/komi1230/kai
- Owner: komi1230
- License: mit
- Created: 2019-12-01T11:52:07.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-08T07:57:50.000Z (about 4 years ago)
- Last Synced: 2024-11-10T19:52:15.449Z (3 months ago)
- Topics: common-lisp, roswell
- Language: Common Lisp
- Homepage: https://komi1230.github.io/kai
- Size: 291 KB
- Stars: 86
- Watchers: 7
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kai
Kai is a plotter library for Common Lisp.
![img1](./examples/img1.png)
![img2](./examples/img2.png)## Installation
### Roswell
With [roswell](https://github.com/roswell/roswell), install this repository.
```bash
$ ros install komi1230/kai
```And setup roswell REPL and load with Quicklisp:
```lisp
(ql:quickload :kai)
```### ASDF
First, clone this repository and load this:
In terminal:
```bash
$ git clone https://github.com/komi1230/kai
```And load with ASDF:
```lisp
(asdf:load-system :kai)
```## How to use
Check [example](https://github.com/komi1230/kai/blob/master/examples/main.lisp)
Prepare some data:
```lisp
;; x-axis
(defparameter x
(loop for i from 0 below 10 by 0.1
collect i));; y-axis
(defparameter y
(mapcar #'sin x))
```This example uses List data but Array is also OK.
### Scatter plot
```lisp
(kai:line x y)
```or
```lisp
(kai:line y)
```You can add some options:
```lisp
(kai:line y
:color :magenta
:width 10)
```### Style (Not Necessary)
```lisp
(kai:title "hogehoge plot")
```### Show
```lisp
(kai:show)
```