(add-line chart
x
y
&
{:keys [series-label points? auto-sort?]
:or {series-label "x" auto-sort? true}})
Plots a line on the given scatter or line plot (xy-plot) of the (x,y) points. Options: :series-label (default 'x') :points? (default false) :auto-sort-x-data? (default true)
;; Clojure's doto macro can be used to build a chart (doto (histogram (sample-normal 1000) :density true) (add-lines (range -3 3 0.05) (pdf-normal (range -3 3 0.05))) view)
Plots a line on the given scatter or line plot (xy-plot) of the (x,y) points. Options: :series-label (default 'x') :points? (default false) :auto-sort-x-data? (default true) ;; Clojure's doto macro can be used to build a chart (doto (histogram (sample-normal 1000) :density true) (add-lines (range -3 3 0.05) (pdf-normal (range -3 3 0.05))) view)
(add-parametric chart
f
min-range
max-range
&
{:keys [series-label step-size] :or {series-label "x"}})
Adds a xy-plot of the given parametric function to the given chart, returning a modified version of the chart. Function takes 1 argument t and returns point [x y]. Options: :series-label (default 'x') :step-size (default (/ (- max-range min-range) 500))
Adds a xy-plot of the given parametric function to the given chart, returning a modified version of the chart. Function takes 1 argument t and returns point [x y]. Options: :series-label (default 'x') :step-size (default (/ (- max-range min-range) 500))
(add-points chart x y & {:keys [series-label] :or {series-label "x"}})
Plots points on the given scatter or line plot (xy-plot) of the (x,y) points. Options: :series-label (default 'x') :auto-sort-x-data? (default true)
Plots points on the given scatter or line plot (xy-plot) of the (x,y) points. Options: :series-label (default 'x') :auto-sort-x-data? (default true)
(bar-chart x
y
&
{:keys [title x-label y-label legend? series-label vertical?]
:or {x-label "x" y-label "y" series-label "x" vertical? true}})
Returns a JFreeChart object representing a bar-chart of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :vertical? (default true)
Returns a JFreeChart object representing a bar-chart of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :vertical? (default true)
(heat-map
f
x-min
x-max
y-min
y-max
&
{:keys [title x-label y-label z-label color? include-zero?]
:or {x-label "x" y-label "y" z-label "z" color? true include-zero? true}})
Function should take two scalar arguments and return a scalar. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :z-label (default 'z') :color? (default true) -- should the plot be in color or not? :include-zero? (default true) -- should the plot include the origin if it if not in the ranges specified?
Function should take two scalar arguments and return a scalar. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :z-label (default 'z') :color? (default true) -- should the plot be in color or not? :include-zero? (default true) -- should the plot include the origin if it if not in the ranges specified?
(histogram x
&
{:keys [title x-label y-label legend? series-label nbins density?]
:or {x-label "x" y-label "y" series-label "x" nbins 10}})
Returns a JFreeChart object representing the histogram of the given data. Options: :nbins (default 10) number of bins :density? (default false) if false, plots frequency, otherwise density :title (default 'Histogram') main title :x-label (default x expression) :y-label (default 'Frequency') :legend (default false) prints legend :series-label (default x expression)
Returns a JFreeChart object representing the histogram of the given data. Options: :nbins (default 10) number of bins :density? (default false) if false, plots frequency, otherwise density :title (default 'Histogram') main title :x-label (default x expression) :y-label (default 'Frequency') :legend (default false) prints legend :series-label (default x expression)
(parametric-plot
f
min-range
max-range
&
{:keys [title x-label y-label legend? series-label step-size vertical?]
:or {x-label "x" y-label "y" series-label "x" vertical? true}})
Returns a JFreeChart object representing a parametric plot of the given function. Function should take a value t and return a point [x y] Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :step-size (default (/ (- max-range min-range) 500))
Returns a JFreeChart object representing a parametric plot of the given function. Function should take a value t and return a point [x y] Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :step-size (default (/ (- max-range min-range) 500))
(save-plot plot filename)
filename: 'plot.png' or (FileOutputStream. '/tmp/plot.png')
filename: 'plot.png' or (FileOutputStream. '/tmp/plot.png')
(scatter-plot x
y
&
{:keys [title x-label y-label legend? series-label density? nbins
gradient?]
:or {x-label "x" y-label "y" series-label "x" nbins 10}})
Returns a JFreeChart object representing a scatter-plot of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :density? (default false) -- chart will represent density instead of frequency. :nbins (default 10) -- number of bins (i.e. bars) :gradient? (default false) -- use gradient on bars
Returns a JFreeChart object representing a scatter-plot of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :density? (default false) -- chart will represent density instead of frequency. :nbins (default 10) -- number of bins (i.e. bars) :gradient? (default false) -- use gradient on bars
(view-plot plot)
plot can also be a saved file: (view 'plot.png')
plot can also be a saved file: (view 'plot.png')
(xy-plot
x
y
&
{:keys [title x-label y-label legend? series-label points? auto-sort-x-data?]
:or {x-label "x" y-label "y" series-label "x" auto-sort-x-data? true}})
Returns a JFreeChart object representing a xy-plot of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :points? (default false) :auto-sort-x-data? (default true)
References: ;; see INCANTER_HOME/examples/probability_plots.clj for more examples of plots http://www.jfree.org/jfreechart/api/javadoc/ http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html
Returns a JFreeChart object representing a xy-plot of the given data. Options: :title (default nil) :x-label (default 'x') :y-label (default 'y') :legend? (default false) :series-label (default 'x') :points? (default false) :auto-sort-x-data? (default true) References: ;; see INCANTER_HOME/examples/probability_plots.clj for more examples of plots http://www.jfree.org/jfreechart/api/javadoc/ http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/JFreeChart.html
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close