# @coda/ui

# heatmap

 heatmap(options: object, source: Stream): Stream

Simple Heatmap UI component. The heatmap works like a sonogram
visualization (sliding window).

Parameter Type Default Description
options object Heatmap options
options.duration number 5 Duration of the window
options.refresh number 50 Refresh rate (ms)
options.legend string '' Plot legend
source Stream Input stream (scalar or vector)

Returns Stream Scalogram stream

Example

noise = periodic(20).rand({ size: 20 }).heatmap();

# looper

 looper(options: object, source: Stream): Stream

Data Looper UI component. This module allows to record a buffer of Stream
data that can be looped.

Parameter Type Default Description
options object Looper UI options
options.refresh number 50 Refresh rate (ms)
options.stacked boolean false Specifies if curves should be
stacked (by default, curves are superposed)
options.fill string 'none' Plain fill options:
- 'none': no plain filling (defaut)
- 'bottom': fill from bottom
- 'middle': fill from middle
- 'top': fill to top
source Stream Input Stream (scalar or vector)

Returns Stream Output Stream: either unchanged input stream (in
'thru' or 'recording' modes), or loop of the recorded buffer (in playing
mode)

Example

data = periodic(10).rand().mvavrg({ size: 30 }).plot();
l = data.looper().plot();

# nodes

 nodes(options: object, source: Stream): Stream

Nodes UI component with nodes interface. Multibuffer. Records to a global buffer.

Parameter Type Default Description
options object Nodes options
options.name string '' Buffer name
options.refresh number 50 Refresh rate (ms)
options.stacked boolean false Specifies if curves should be
stacked (by default, curves are superposed)
options.fill string 'none' Plain fill options:
- 'none': no plain filling (defaut)
- 'bottom': fill from bottom
- 'middle': fill from middle
- 'top': fill to top
source Stream Input Stream (scalar or vector)

Returns Stream Unchanged Input Stream

# plot

 plot(options: object, source: Stream): Stream

Simple Plotter UI component.

Parameter Type Default Description
options object Plot options
options.duration number 5 Duration of the window
options.refresh number 50 Refresh rate (ms)
options.legend string '' Plot legend
options.stacked boolean false Specifies if curves should be
stacked (by default, curves are superposed)
options.fill string 'none' Plain fill options:
- 'none': no plain filling (defaut)
- 'bottom': fill from bottom
- 'middle': fill from middle
- 'top': fill to top
source Stream Input Stream (scalar or vector)

Returns Stream Unchanged Input Stream

Example

p = periodic(20).rand({ size: 3 })
  .plot({ legend: 'Simple plot', stacked: true });
runEffects(p, newDefaultScheduler());

# recorder

 recorder(options: object, source: Stream): Stream

Recorder UI component. Multibuffer. Records to a global buffer.

Parameter Type Default Description
options object Recorder options
options.name string '' Buffer name
options.refresh number 50 Refresh rate (ms)
options.stacked boolean false Specifies if curves should be
stacked (by default, curves are superposed)
options.fill string 'none' Plain fill options:
- 'none': no plain filling (defaut)
- 'bottom': fill from bottom
- 'middle': fill from middle
- 'top': fill to top
source Stream Input Stream (scalar or vector)

Returns Stream Unchanged Input Stream