Created
May 29, 2009 00:18
-
-
Save liebke/119687 to your computer and use it in GitHub Desktop.
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 stats charts)) | |
;; Overlay a xy-plot on a histogram | |
;; Plot a histogram of a normal sample of size 1000, using the :density option | |
;; so that the y-axis represents density instead of the default frequency. | |
;; Then plot a pdf curve for the normal distribution on the same chart. | |
(def x (range -3 3 0.01)) | |
(doto (histogram (sample-normal 1000) :density true) | |
(add-lines x (pdf-normal x)) | |
view) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment