clj-xchart is a Clojure wrapper over the Java library XChart, which is a lightweight library for plotting data. Here’s an example similar to Hans Rosling’s famous bubble chart, visualised with clj-xchart:

GDP per capita

For more examples, you can have a look over at the examples page.

clj-xchart supports all of the following chart types:

It also provides the following useful features:

clj-xchart does not provide these features, and most likely never will:

If you want to provide such graphs to a web page, consider using a ClojureScript/JavaScript library instead. There are many good ones out there!

To use, simply add this line to your project.clj’s :dependency vector:


     [com.hypirion/clj-xchart "0.2.0"]

Then read the tutorial on how to use it to generate charts.