So far, we've been viewing the graphs we've created in a window on our computer. This is extremely handy, especially for quickly generating a graph and seeing what's on it. However, the chart would be more useful if we could save it. Then, we could embed it into Word documents or web pages, or wherever.
In this recipe, we'll save a graph of the Iris data that we created in the Creating scatter plots with Incanter recipe.
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])
We'll also use the chart object that we created in the Creating scatter plots with Incanter recipe, and we'll keep using the variable name iris-petal-scatter
for it.