Skip to content

Instantly share code, notes, and snippets.

@syou6162
Created January 5, 2012 22:05
Show Gist options
  • Save syou6162/1567578 to your computer and use it in GitHub Desktop.
Save syou6162/1567578 to your computer and use it in GitHub Desktop.
incanterの描画を1秒置きに更新していくコード
(use '(incanter core stats charts))
(def min-val 1)
(def max-val 10)
(def x (view (function-plot sin min-val max-val)))
(for [i (range 100)]
(let [chart-before (function-plot sin min-val max-val)
chart-after (function-plot log min-val max-val)]
(.setContentPane x (org.jfree.chart.ChartPanel. (rand-nth [chart-before chart-after])))
(.setVisible x true)
(System/gc)
(Thread/sleep 1000)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment