komi1230 / kai

A high-level plotter library for Common Lisp.

Home Page:https://komi1230.github.io/kai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kai

Kai is a plotter library for Common Lisp.

img1 img2

Installation

Roswell

With roswell, install this repository.

$ ros install komi1230/kai

And setup roswell REPL and load with Quicklisp:

(ql:quickload :kai)

ASDF

First, clone this repository and load this:

In terminal:

$ git clone https://github.com/komi1230/kai

And load with ASDF:

(asdf:load-system :kai)

How to use

Check example

Prepare some data:

;; 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

(kai:line x y)

or

(kai:line y)

You can add some options:

(kai:line y 
          :color :magenta 
          :width 10)

Style (Not Necessary)

(kai:title "hogehoge plot")

Show

(kai:show)

About

A high-level plotter library for Common Lisp.

https://komi1230.github.io/kai

License:MIT License


Languages

Language:Common Lisp 100.0%