Returns a JFreeChart object representing a pie-chart of the given data.
Use the 'view' function to display the chart, or the 'save' function
to write it to a file.
Arguments:
categories -- a sequence of categories
values -- a sequence of numeric values
Options:
:title (default 'Histogram') main title
:legend (default false) prints legend
See also:
view and save
Examples:
(use '(incanter core stats charts datasets))
(view (pie-chart ["a" "b" "c"] [10 20 30]))
(view (pie-chart (sample "abcdefghij" :size 10 :replacement true)
(sample-uniform 10 :max 50) :legend true))
(with-data (->> (get-dataset :hair-eye-color)
($rollup :sum :count [:hair :eye]))
(view $data)
(view (pie-chart :hair :count :title "Hair Color"))
(view (pie-chart :eye :count :title "Eye Color")))
References:
http://www.jfree.org/jfreechart/api/javadoc/
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html
Comments top
No comments for pie-chart. Log in to add a comment.