Incanter's chart API is easy to use and provides a powerful wrapper around JFreeChart (http://www.jfree.org/jfreechart/); however, it doesn't expose JFreeChart's full variety of chart types or all of the options that JFreeChart provides. In order to access those, we have to dive from Incanter's API to the JFreeChart objects. Fortunately, that's quite easy to do. Let's see how.
We'll use the same dependencies in our project.clj
file as we did in the Creating scatter plots with Incanter recipe.
We'll use the following set of imports in our script or REPL:
(require '[incanter.core :as i] '[incanter.charts :as c] 'incanter.datasets) (import org.jfree.chart.renderer.category.LayeredBarRenderer org.jfree.util.SortOrder)
We'll use the Iris dataset again. Here's how to load it into Incanter.
(def iris (incanter.datasets/get-dataset :iris))