Skip to content

Instantly share code, notes, and snippets.

@liebke
Created April 20, 2009 19:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liebke/98676 to your computer and use it in GitHub Desktop.
Save liebke/98676 to your computer and use it in GitHub Desktop.
(use '(incanter stats charts)
;; Multi-line plots can be created using Clojure's doto macro
(def x (range 0 20 0.1))
(doto (xy-plot x (cdf-gamma x :shape 1 :rate 2)
:title "Gamma CDF"
:legend true
:y-label "Probability")
view
clear-background
(add-lines x (cdf-gamma x :shape 2 :rate 2))
(add-lines x (cdf-gamma x :shape 3 :rate 2))
(add-lines x (cdf-gamma x :shape 5 :rate 1))
(add-lines x (cdf-gamma x :shape 9 :rate 0.5)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment