1.2.3-SNAPSHOT permalink Arrow_down_16x16



  • (add-histogram* chart x & options)

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:277 top

(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))]
        (.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)
Vars in incanter.charts/add-histogram*: -> defn double-array let
Used in 0 other vars

Comments top

No comments for add-histogram*. Log in to add a comment.