Skip to content

kimim/clj-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clj-chart demo

https://img.shields.io/clojars/v/io.github.kimim/clj-chart.svg

Quick Chart

Draw quick xy chart with two vectors, vector for x and vector for y:

(require '[clj-chart.core :as c])
(require '[clojure.math :as math])
(let [x (range 0 10 0.01)
      y (map #(math/sin %) x)
      chart (c/quick-xy x y)]
  (c/save! "docs/figures/quick-xy.svg" chart))

figures/quick-xy.svg

Draw a diagram with a sequence of x and y:

(require '[clj-chart.core :as c])
(let [chart (c/quick-seq [[1 1][2 3][3 9]])]
  (c/save! "docs/figures/quick-seq.svg" chart))

figures/quick-seq.svg

Draw quick xy chart with sequence of maps:

(require '[clj-chart.core :as c])
(let [chart (c/quick-mapseq [{:x 1 :y 1}{:x 2 :y 4}{:x 3 :y 9}])]
  (c/save! "docs/figures/quick-mapseq.svg" chart))

figures/quick-mapseq.svg

About

Using XChart in Clojure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published