Liking cljdoc? Tell your friends :D

provisdom.test.midje


add-lineclj

(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)
sourceraw docstring

add-parametricclj

(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))
sourceraw docstring

add-pointsclj

(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)
sourceraw docstring

bar-chartclj

(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)
sourceraw docstring

check-withclj/smacro

(check-with call-form tree)
source

heat-mapclj

(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?
sourceraw docstring

histogramclj

(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)
sourceraw docstring

parametric-plotclj

(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))
sourceraw docstring

save-plotclj

(save-plot plot filename)

filename: 'plot.png' or (FileOutputStream. '/tmp/plot.png')

filename: 'plot.png' or (FileOutputStream. '/tmp/plot.png')
sourceraw docstring

scatter-plotclj

(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
sourceraw docstring

test-roughlyclj

(test-roughly expected)
(test-roughly expected abs)
(test-roughly expected abs rel)

With three arguments, accepts a value within abs of the expected value or within rel * expected of the expected value With one argument, the defaults are abs = 1e-6 and rel = 1e-3.

With three arguments, accepts a value within abs of the expected value
   or within rel * expected of the expected value
With one argument, the defaults are abs = 1e-6 and rel = 1e-3.
sourceraw docstring

view-plotclj

(view-plot plot)

plot can also be a saved file: (view 'plot.png')

plot can also be a saved file: (view 'plot.png')
sourceraw docstring

xy-plotclj

(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
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close