TimeSeriesPlot¶
Plot a multi-channel continuous streaming time series in real time.
This node accepts streaming data, and maintains a view of the most recent n seconds of data (the window length is adjustable). The node is made for continuous (i.e., not segmented) data. If the stream_name is not specified, the first signal stream will be plotted. This node requires that the data have a time axis, and either a space (channels) or a feature axis. All other axes (e.g., frequency) are folded into a flat space axis. For better viewing, this node supports removing the mean of the data so that the signals are centered, as well as auto-scaling of the data to a standard scale (using the same scale factor for all channels), and these options are enabled by default. The node also provides keyboard shortcuts for changing the scale (+ and -), the displayed time range (* and /), and for toggling the auto-scaling (a) and zero-mean (z) options. For performance reasons the default max number of channels displayed is set at 32, which will displayed the first 32 channels in the data (if there are more than that). Use the PgDn and PgUp keys to show the next/prev set of 32 channels. You can also change the number of channels shown in the max_channels parameter. Note that this plotter is not meant for scrollable review of a non-streaming dataset; for that please use the ScrollingPlot node.
Version 1.2.4
Ports/Properties¶
stream¶
Name of stream to plot. Wildcards are supported, i.e. mystream* will plot the first stream whose name starts with mystream.
stream_name¶
max_channels¶
Max number of channels to display at once. Note that a large number of channels can slow the plot down considerably, and is not recommended. Alternatively, instead of increasing this, use the PgUp/PgDn (or u/d) keys in the plot window to show the prev/next set of n channels (where n is this number).
auto_line_colors¶
Automatically assign a different color to each line or bar. Takes precedence if selected. See colormap property to determine the color selection.
colormap¶
Colormap to use for auto assign colors. (See matplotlib online documentation for colormap examples.)
background_color¶
Background color. This can be hexadecimal (hex) notation (#RRGGBB) or CSS named colors ('white'). One resource (among many) that provides a list of both hex and CSS named colors is https://www.w3.org/wiki/CSS/Properties/color/keywords.
decoration_color¶
Color of the axis labels and ticks. (See background_color description for details.).
plot_minmax¶
Display min and max values of original data irrespective of scaling.
title¶
Title of the plot window. The placeholders $(streamname), $(sourceid), and $(sourceurl) can be used here.
initial_dims¶
Initial position of the window on the monitor. This is given in pixels, and is formatted as [x, y, width, height]. If x, y are set to 0 each, then the window will appear in the top left corner of the current screen.
left_offset¶
Left offset of the window on the monitor. The x value in the initial window position property will be increased by this amount. Use this to shift all plots to a second monitor, for example. May be a negative number (i.e., to move plots to a window to the left).
show_toolbar¶
Show the window toolbar (which provides some additional functions).
always_on_top¶
Window should be always on top. If this is enabled, then the window will not be occluded by other windows.
tight_layout¶
Reduce the amount of white space around the plot within the window.
font_size¶
Font size (in points) of text plotted outside the plot axes, such as axis labels, legend, etc.
annotation_font_size¶
Font size (in points) for text which appear inside the plot axes, such as markers, scale, etc.
antialiased¶
Draw graphics antialiased. If set to False, lines will appear more pixelated or 'jaggy', but plotting should render faster.
max_redraw_hz¶
Maximum redraw rate of this plot in Hz. Limits how often the matplotlib canvas is repainted (and, when the plot feeds a Plot Dashboard, how often the dashboard re-renders the corresponding panel). None means use the Plot Dashboard's default for downstream panels and no throttle for this node's own window. 0 means no throttle (legacy behavior, draw on every tick). A positive value is the upper bound on the redraw rate. Reducing this is particularly useful for nodes whose draw is expensive (e.g. matplotlib tables, which are heavy on macOS due to CoreText).
line_color¶
Color of the lines. (See background_color description for details.)
zero_color¶
Color of the grid lines. (See background color description for details.)
line_width¶
Width of the lines (or bars).
label_rotation¶
Orientation of plot Y axis tick labels.
x_label¶
Label for the X axis. Leave empty to automatically use a suitable default.
y_label¶
Label for the Y axis. Leave empty to automatically use a suitable default.
verbose¶
Print additional information such as if the incoming packet has no data to plot, etc.
track_window_position¶
Track the window position and print the new position in the console. This is useful for setting the window position property.
suppress_window¶
Suppress the display window. When enabled, the node will not open a plot window; use this when feeding the figure output into a Plot Dashboard node.
figure_out¶
Plot data for PlotDashboard (PlotData).
data¶
Data to display.
value¶
Optional scalar value to display as a text overlay in the plot (e.g ., a computed BPM while showing a PPG trace). Expects a Packet whose first chunk contains a block with a single numeric element (i.e., block.data is a 1-element array). If the block contains multiple elements, only the first is used.
x_axis¶
Axis containing the data to plot along the X axis. Usually this is time, but may also be instance if plotting trials rather than time points. This axis must contain a field named 'times'.
y_axis¶
Axis containing the data to plot along the Y axis. You may also additionally specify an axis label such as 'feature.concentrations'.
time_range¶
Time range to display. This is the number of seconds of recent data that shall be plotted.
absolute_time¶
Show absolute time in time axis. If this is enabled, then the absolute time stamps of the data will be displayed on the axis. These will depend on the data, and you can use the ShiftTimestamps node prior to this node to reset them to 0 relative to the start of the data. If this property is false, the X axis will show the time relative to the most recent time point in the data (i.e., the current time point is 0.0, and 3 seconds earlier would be displayed as -3.0).
plot_markers¶
Display event markers as vertical lines.
marker_color¶
Color of vertical lines for marker events. Either a string (see background_color description), or a dictionary that represents a mapping from event type to color (the special key '*' stands for all other markers).
stacked¶
Display channels stacked on top of each other (default) or superimposed using the same Y axis. When stacked mode is off, all channels share the same Y axis and are drawn on top of each other. You can toggle this with the 's' key.
y_range¶
Range of values for the Y axis when in unstacked (superimposed) mode, as a two-element list [min, max]. If set to [0, 0], the range is determined automatically from the scale property. This property has no effect in stacked mode.
zeromean¶
Display data with mean corrected to zero. This makes sure that each channel is centered for better viewing. If this is disabled, your data may be outside the window, especially if you have not performed high-pass filtering on your signal. Enabling this may make the curves appear to shift up or down if their mean is not already zero.
scale¶
Data scale. Increasing this value will magnify the plot curves correspondingly. You can also use the + and - keys to change the scale interactively.
autoscale¶
Automatically scale channels to a standard scale. This makes sure that channels are rescaled such that they fit comfortably in the drawing area. All channels are rescaled by the same scale factor. Enabling this may make the curves appear to change scale suddenly, especially when large artifacts come into view or go out of view.
nans_as_zero¶
Show NaN values as zero.
no_concatenate¶
Don't concatenate successive data. Can be used to display the content of a sliding window (e.g., MovingWindow node).
value_label¶
Label to display next to the overlay value (e.g ., 'BPM'). If empty, just the number is shown.
value_decimals¶
Number of decimal places for the overlay value. Set to 0 to display as an integer.
override_srate¶
Deprecated; use the OverrideSamplingRate before this node if necessary.
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.