Plotje

1 Plotje

Composable plotting in Clojure

Plotje is a Clojure library for composable plotting, inspired by the Grammar of Graphics.

General info

Website https://scicloj.github.io/plotje/
Source (GitHub repo)
Deps Clojars Project
License MIT
Status πŸ› alphaπŸ› 

Usage

While the first release 0.1.0 is being prepared, install Plotje directly from GitHub by adding this to your deps.edn:

io.github.scicloj/plotje
{:git/url "https://github.com/scicloj/plotje.git"
 :git/sha "<sha-from-main>"}

Once 0.1.0 is published to Clojars, the install line will become:

org.scicloj/plotje {:mvn/version "0.1.0"}

Plotje is intended to be used with data-visualization tools that support the Kindly convention such as Clay.

Quick example

Line chart with point markers from plain Clojure data:

(-> [{:month "Jan" :sales 120}
     {:month "Feb" :sales 95}
     {:month "Mar" :sales 140}
     {:month "Apr" :sales 175}
     {:month "May" :sales 160}
     {:month "Jun" :sales 210}]
    (pj/lay-line :month :sales)
    pj/lay-point
    (pj/options {:title "Monthly Sales"}))

Scatter plot matrix (SPLOM) β€” all pairwise combinations with color grouping:

(-> (rdatasets/datasets-iris)
    (pj/pose {:color :species})
    (pj/pose (pj/cross [:sepal-length :sepal-width
                        :petal-length :petal-width]
                       [:sepal-length :sepal-width
                        :petal-length :petal-width]))
    (pj/options {:title "Iris SPLOM"}))

Documentation

Full documentation

License

Copyright Β© 2025-2026 Scicloj

Distributed under the MIT License.

Chapters of this book

source: notebooks/index.clj