Skip to content

IntensityChart

Scrolling 2-D color map: spectrogram or waterfall (CHART-101).

IntensityChart, light theme IntensityChart, dark theme

Graphs, time · Widget catalog · API reference · schema intensitychart.schema.json

Example

The traits of the picture above:

ai.IntensityChart(
    label="IntensityChart",
    history=120,
    n_bins=48,
    dt=0.05,
    y_max=2400,
    x_unit="s",
    unit="dB",
    size=(420, 200),
)

The data of the picture (samples, history or drawing) is sent with the widget's methods, not as traits: see the widget catalog.

Traits

Trait Type Default Set by Description
value object {} host Summary of the latest row {rows, min, max, argmax}, written by the host with each append.
history integer 200 host Rows kept and shown.
n_bins integer 64 host Values per row.
dt number 1 host Time step between rows in x-axis units; 0 is shown as 1.
y_min number 0 host Value of the lower edge of the first bin.
y_max number or null null host Value of the upper edge of the last bin; null: y_min + n_bins.
z_min number 0 host Color range when autoscale_z is off.
z_max number 1 host
autoscale_z boolean true host
colormap "viridis", "inferno", "magma", "plasma", "gray", "jet" "viridis" host
show_colorbar boolean true host
Common traits (15), shared with other widgets
Trait Type Default Set by Description
mode "control", "indicator" "indicator" host "control": the user sets the value; "indicator": display only.
label string "" host Plain text, never interpreted as HTML (SEC-002).
disabled boolean false host Greyed out, input rejected.
visible boolean true host
tooltip string "" host Plain text shown on hover.
size array [480,240] host [width, height] in CSS pixels.
style "modern", "classic", "system" "modern" host
theme "auto", "light", "dark", "system" "auto" host "auto": the style decides; "system": the host page or the operating system (STYLE-007).
skin object {} host Replaceable drawing parts: part name -> SVG source, sanitized (STYLE-005, STYLE-006).
cursors array of object [] host, widget Cursors {x, name, color} (CHART-104). Dragged or typed by the operator, also on indicators; a host may complete a missing name as C (Python does).
cursor_values array of object [] host Readout of the cursors for the host program, {name, x, values}, computed by the host from its data. The front end draws its own readout and does not read this trait.
annotations array of object [] host Text annotations {x, y, text, color} in data coordinates (CHART-105).
export boolean true host Offer CSV, PNG and SVG downloads in the toolbar (CHART-107).
x_unit string "" host
unit string "" host

Set by: host, the program (Python, Julia, ...); widget, the user through the widget; derived, computed from other traits by the host that owns the state, or by the widget. See the trait contract.