1.2.3-SNAPSHOT Arrow_down_16x16

add-box-plot

incanter.charts

  • (add-box-plot chart x & options)

Adds an additional box to an existing box-plot, returns the modified chart object.

Options:
:series-label (default x expression)

Examples:

(use '(incanter core charts stats))
(doto (box-plot (sample-normal 1000) :legend true)
view
(add-box-plot (sample-normal 1000 :sd 2))
(add-box-plot (sample-gamma 1000)))


(with-data (get-dataset :iris)
(doto (box-plot :Sepal.Length :legend true)
(add-box-plot :Petal.Length)
(add-box-plot :Sepal.Width)
(add-box-plot :Petal.Width)
view))


References:
http://www.jfree.org/jfreechart/api/javadoc/
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/charts.clj:351 top

(defmacro add-box-plot
"
  Adds an additional box to an existing box-plot, returns the modified chart object.

  Options:
    :series-label (default x expression)

  Examples:

      (use '(incanter core charts stats))
      (doto (box-plot (sample-normal 1000) :legend true)
            view
            (add-box-plot (sample-normal 1000 :sd 2))
            (add-box-plot (sample-gamma 1000)))


     (with-data (get-dataset :iris)
       (doto (box-plot :Sepal.Length :legend true)
         (add-box-plot :Petal.Length)
         (add-box-plot :Sepal.Width)
         (add-box-plot :Petal.Width)
         view))


  References:
    http://www.jfree.org/jfreechart/api/javadoc/
    http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html

"
  ([chart x & options]
    `(let [opts# ~(when options (apply assoc {} options))
           series-lab# (or (:series-label opts#) (str '~x))
           args# (concat [~chart ~x] (apply concat (seq (apply assoc opts# 
							[:series-label series-lab#]))))]
        (apply add-box-plot* args#))))
Vars in incanter.charts/add-box-plot: apply assoc defmacro when concat let list or seq str vector
Used in 0 other vars

Comments top

No comments for add-box-plot. Log in to add a comment.