This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use '(incanter core charts io)) | |
;; create points to plot | |
(def x1 (range 0.1 5 0.1)) | |
;; highlight a couple different sets of critical points | |
(def crit-pts1 [0.5 2 3]) | |
(def crit-pts2 [0.25 2.5 3.5]) | |
;; define a reciprocal function | |
(defn reciprocal [x] (div 1 x)) |
NewerOlder