streams.graphs
Simple graphing utility. Relies on darkstar, loaded dynamically, to produce svg graphs.
Recommended Dependencies-
applied-science/darkstar
{:git/url "https://github.com/appliedsciencestudio/darkstar/"
:sha "abd480cc382b7ae143f7902ee9d300cdc1a705cc"
:exclusions [org.graalvm.js/js org.graalvm.js/js-scriptengine]}
org.graalvm.js/js {:mvn/version "20.3.2"}
org.graalvm.js/js-scriptengine {:mvn/version "20.3.2"}}
Example Usage:
user> (-> (streams/interleave (streams/gaussian-stream)
(streams/+ (streams/gaussian-stream) 10))
(graphs/stream-area-chart {:title :dual-lobe-gaussian
:width 400 :height 100
:n-bins 100})
(graphs/spit-chart-svg-to-file "docs/dual-lobe-gaussian.svg"))
nil
stream-area-chart
(stream-area-chart s {:keys [title width height], :or {title "", width 800, height 600}, :as opts})Create an area chart of the histogram of the stream. See documentation for streams.api/bin-stream.