Skip to content
This repository has been archived by the owner on Apr 26, 2019. It is now read-only.

Commit

Permalink
Minor updated to heat-map example in doc-string.
Browse files Browse the repository at this point in the history
  • Loading branch information
liebke committed Mar 9, 2010
1 parent 61975ad commit 37381f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/incanter-charts/src/main/clojure/incanter/charts.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1705,16 +1705,16 @@
(use '(incanter core stats charts))
(let [points [[0 5]
[0 10]
[15 0]
[18 10]]
(let [data [[0 5 1 2]
[0 10 1.9 1]
[15 0 0.5 1.5]
[18 10 4.5 2.1]]
diffusion (fn [x y]
(sum (map #(pdf-normal (euclidean-distance [x y] %) :sd 2)
points)))]
(sum (map #(pdf-normal (euclidean-distance [x y] (take 2 %))
:mean (nth % 2) :sd (last %))
data)))]
(view (heat-map diffusion -5 20 -5 20)))
"
([function x-min x-max y-min y-max & options]
`(let [opts# ~(when options (apply assoc {} options))
Expand Down

0 comments on commit 37381f2

Please sign in to comment.