(defn add-histogram*
([chart x & options]
(let [opts (when options (apply assoc {} options))
data (:data opts)
_x (if (coll? x) (to-list x) ($ x data))
data-plot (.getPlot chart)
n (.getDatasetCount data-plot)
nbins (or (:nbins opts) 10)
series-lab (or (:series-label opts) (str 'x))]
(do
(.addSeries (.getDataset data-plot) series-lab (double-array _x) nbins)
(.setSeriesOutlinePaint (-> chart .getPlot .getRenderer) n java.awt.Color/lightGray)
(.setSeriesRenderingOrder data-plot org.jfree.chart.plot.SeriesRenderingOrder/FORWARD)
(.fireChartChanged chart)
chart))))
Used in 0 other vars
Comments top
No comments for add-histogram*. Log in to add a comment.