提问人:user3139545 提问时间:5/25/2016 更新时间:5/25/2016 访问量:109
编写 Incanter 图表对象,通过一次视图调用显示多个图表
Compose Incanter chart objects to show multiple charts with one view call
问:
我有这样的东西:
(defn plot-simulation [f]
(let [x (range 1 1000)
ye0 (->> (run-simulation 5 0.000000000000000000000001) ;; needs to run all 2000 in paralell
(take 1000)
(map f))
ye01 (->> (run-simulation 5 1/10)
(take 1000)
(map f))
ye001 (->> (run-simulation 5 1/100)
(take 1000)
(map f))
]
;; How to add another chart in the view?
(-> (c/xy-plot x ye0
:x-label "Steps"
:y-label "Somethings"
:series-label "e=0"
:legend true)
(c/add-lines x ye01
:series-label "e=0.01")
(c/add-lines x ye001
:series-label "e=0.001")
(i/view))))
显示模拟中的三条线。现在,我不想在一个图表中绘制三条线,而是要绘制三个图表,每个图表中一条线,只使用一次查看调用。使用 Incanter 可以做到这一点吗?
答: 暂无答案
评论