I'm trying to do some (simple) plots in Clojure and it seems like Oz would be a great long term solution. However, I'm running into problems just trying to get the example code to run. PS I'm completely new to ClojureScript / Reagent / Hiccup ...
On the website it shows the following example code:
(defn play-data [& names]
(for [n names
i (range 20)]
{:time i :item n :quantity (+ (Math/pow (* i (count n)) 0.8) (rand-int (count n)))}))
(def line-plot
{:data {:values (play-data "monkey" "slipper" "broom")}
:encoding {:x {:field "time" :type "quantitative"}
:y {:field "quantity" :type "quantitative"}
:color {:field "item" :type "nominal"}}
:mark "line"})
;; Render the plot
(oz/view! line-plot)
For me, (oz/view! ...) creates a blank page in my browser but no plots actually get outputted. Can someone help me figure out what's going on? How I do check that Oz even connected to the browser directly? How did Oz figure out which browser to use (I'm currently using Brave)?
