Liking cljdoc? Tell your friends :D

pinkgorilla.ui.gorilla-plot.multi

multi-plots -multiple plots in one chart -multiple plots horizontal

multi-plots
-multiple plots in one chart
-multiple plots horizontal
raw docstring

build-seriesclj/s

(build-series width time last? m)
source

build-series-allclj/s

(build-series-all width time last? m)

builds a vega lite plot-spec for a single series

builds a vega lite plot-spec for a single series
sourceraw docstring

build-series-rectclj/s

(build-series-rect width _ _ m)

builds a vega lite plot-spec for a single series

builds a vega lite plot-spec for a single series
sourceraw docstring

container-liteclj/s

(container-lite)

vega-lite container (version 4)

vega-lite container (version 4)
sourceraw docstring

convert-seriesclj/s

(convert-series series time)

converts a series [vector of number] to a vega data spec with name

converts a series [vector of number]
to a vega data spec with name
sourceraw docstring

make-linear-axisclj/s

(make-linear-axis size)
source

make-time-axisclj/s

(make-time-axis size)
source

multi-plotclj/s

(multi-plot & plots)

plots one or more timeseries plots (stacked vertically) input: [options vector-of-plots]

options

  • is optional
  • if specified, a map with optional keys: :width (pixels) :time (time data as unix-long)

a plot contains either

  • one series (map)
  • more series (vector of maps)

a series is a map

  • mandatory keys: :data - vector of (length n)
  • optional keys: :color :orient :left :right :title (of the axis)
    :height :width

example: (def a [1 2 4 3 2]) (def b [-1 1 -2 3 0]) (def c [6 5 1 7 5])

(multi-plot {:width 100} {:data c :orient :left :title "C" :color "blue" :height 20 } [{:data a :orient :right :title "A" :color "red" :height 50} {:data b :orient :left :title "B" :height 50}]))

note that the first plot is single series (therefore a map), the second plot has 2 series (vector of maps)

plots one or more timeseries plots (stacked vertically)
input: [options vector-of-plots]

options
- is optional
- if specified, a map with optional keys:
  :width (pixels)
  :time (time data as unix-long)

a plot contains either 
- one series (map)
- more series (vector of maps)

a series is a map
- mandatory keys:
   :data - vector of (length n)
- optional keys:
   :color
   :orient   :left :right
   :title   (of the axis)    
   :height
   :width

example:
(def a [1 2 4 3 2])
(def b [-1 1 -2 3 0])
(def c [6 5 1 7 5])

(multi-plot {:width 100} 
   {:data c :orient :left :title "C" :color "blue" :height 20 } 
   [{:data a :orient :right :title "A" :color "red" :height 50} 
   {:data b :orient :left :title "B" :height 50}])) 

note that the first plot is single series (therefore a map), 
the second plot has 2 series (vector of maps)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close