https://github.com/komi1230/kai
A high-level plotter library for Common Lisp.
https://github.com/komi1230/kai
common-lisp roswell
Last synced: about 2 months 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-02-08T07:57:50.000Z (about 5 years ago)
- Last Synced: 2025-02-25T16:33:26.171Z (about 1 year ago)
- Topics: common-lisp, roswell
- Language: Common Lisp
- Homepage: https://komi1230.github.io/kai
- Size: 291 KB
- Stars: 89
- Watchers: 7
- Forks: 4
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cl - kai - A high-level plotter library for Common Lisp. A wrapper around the [Plotly](https://plotly.com/javascript/) JS library. [MIT][200]. (Interfaces to other package managers / Third-party APIs)
README
# Kai
Kai is a plotter library for Common Lisp.


## 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)
```