Time charts
A time chart plots channels against their time: waveform time, a time channel, or the row index.
To try this page on the data of its screenshots, download demo-bench.tdms, demo-actuator-test.tdms, and demo-iq.tdms for complex values from the demo files.
|
Open a chart
Each chart is an editor tab:
-
Open chart in a group tab;
-
the chart icon in the editor title bar of the viewer;
-
Measurement Data: Open Chart in the Command Palette.
Place it beside or below the viewer, or in a floating window, and open as many as you need. VS Code reopens them after a restart.
Choose the channels
The list on the left shows each group by time base:
- Waveform time
-
Channels with the
wf_start_timeandwf_incrementproperties of TDMS, or theWAVEFORM_T0andWAVEFORM_DTattributes of h5labview2. - A time channel
-
A timestamp channel, or a channel named as a time, and the channels measured with it. In HDF5 files, CF times and dimension scales are time channels too; see Conventions. Several acquisition rates in one group are recognized: in the demonstration file, a pressure at 1 kHz with
Time_P, two temperatures at 2 Hz withTime_T. - A time channel of another group
-
Channels of a group without time channels, such as alarms logged with the measurements of another group; see Time channels of other groups.
- Row index
-
Channels without time.
Tick the channels: the X axis follows. Select all and Deselect all act on every channel of the list, or on those that match the filter above it. The checkbox of a group plots all its channels, or removes them all: ticked when they are all plotted, mixed when some are. Like Select all, it acts on the channels that match the filter, and leaves out the greyed ones, which cannot share the X axis of the chart. Channels in the toolbar hides the list.
A drawing that takes long, such as thousands of channels ticked at once, shows Plotting 20,000 curves… with a Cancel button, which goes back to the curves before the change.
The X of each time base is a menu: another time channel, any other channel of the same length, or the row index, for all the channels of the time base at once. The menu of a channel changes its own.
Time channels of other groups
Some files keep a group without time channels next to the measurements: alarms or states logged at the same times, one row per measurement. Their channels are plotted against a time channel of the group of the measurements, when they have as many values: they then share its time axis, with the measurement cursors and the grid of values.
-
When the file has only one time channel of their length, or the same times stored two ways (as timestamps and as seconds), the chart finds it: the list shows it as the X of the group, such as Data / Timestamp, and its tooltip says it was found automatically.
-
Otherwise, choose it in the menu of their X, or of a channel, under Time channels of other groups: the time channels of the other groups with as many values.
-
Row index in the menu plots them against their row number again; the chart remembers it.
Channels of several groups are plotted on one time axis, shown as dates and times or as seconds since the start, to the nanosecond.
- Time series only
-
The X values of a curve never go back. A curve whose X values go back, or are missing, is refused with the row where they do. To plot a channel against another one, use an XY chart.
Complex values
A complex channel, such as the I/Q samples of a receiver or the output X + iY of a lock-in amplifier, is plotted by part, each part a curve of its own:
| Part | Value |
|---|---|
real |
The real part (I, or X of a lock-in amplifier), in the unit of the channel. |
imaginary |
The imaginary part (Q, or Y), in the unit of the channel. |
magnitude |
The distance to zero, √(re² + im²), in the unit of the channel. |
phase |
The angle, in radians, from −π to π. |
Ticking a complex channel plots its real and imaginary parts. The arrow before its name opens the rows of its four parts, to tick each one apart. The legends, the measurement cursors and their statistics name each part: Output (magnitude).
Plots
-
The list in the toolbar shares the curves among the plots:
-
One plot per unit: the curves of the same unit share a plot; channels without unit all share one.
-
One plot per channel: each channel has a plot of its own, to read channels one by one, such as channels without unit, or channels of the same name in several groups. The parts of a complex channel share its plots, one per unit: the real and imaginary parts in one, the phase, in radians, in another.
-
All units in one plot: every curve in one plot, the unit of each one after its name in the legend.
-
-
Digital channels are drawn as steps, in strips of 0 and 1: Boolean channels, and integer channels whose values are all 0 or 1, such as the Booleans that LabVIEW writes as U8 and the digital lines of DAQmx.
-
Peaks are never lost, whatever the zoom level: for each pixel column, the chart draws the minimum and maximum of the samples it covers.
Many curves and many plots
The chart keeps its plots readable whatever the number of curves:
- Legends
-
A legend takes at most a quarter of the height of its plot, and scrolls beyond. Beyond 500 curves in a plot, the legend gives their number instead of their names: 20,000 curves. The curve under the mouse is then drawn thicker over the others, with its name and its value beside the pointer.
- Plots
-
Each plot keeps a height of 160 pixels at least. When they do not all fit, such as with One plot per channel and many channels, the plots scroll, and the X axis stays below them. The mouse wheel scrolls them over the Y axes and over the legends, and still zooms over the curves.
Images always show every plot, and whole legends; see Images.
Bring a curve to the front
The mouse over an entry of the legend, or over the row of a plotted channel in the list, brings its curve to the front and turns the other curves of its plot grey, with their statistics. One curve is then easy to follow among many, and to tell apart without relying on its colour.
Navigate
| Gesture | Action |
|---|---|
Mouse wheel |
Zoom in time around the pointer. Over the Y axes or a legend, it scrolls the plots or the legend when they do not all fit; see Many curves and many plots. |
Ctrl + wheel |
Zoom a plot in Y. |
Drag |
Pan. |
Double click |
Show everything. |
+, -, 0 |
Zoom in, zoom out, show everything. |
←, → |
Pan; with the measurement cursors shown, they move the active cursor. |
Page Up, Page Down |
Pan by a page, back and forward. |
The help on the navigation shows the first time the mouse rests on a plot. The legend shows the value of each curve under the pointer, in a space that does not shrink: the legend keeps its length, and its entries stay in place, while the mouse moves. The X under the pointer is rounded to the span of a pixel, such as 7.96 s; the X of a sample, at a cursor or from the grid, keeps all its digits.
Measurement cursors
Cursors C1/C2 in the toolbar shows two measurement cursors. The table under the plots gives, for each curve:
-
its values at C1 and C2, and their difference;
-
the difference of X, and 1/ΔX;
-
the minimum, maximum and mean between the cursors, also marked on the curves: triangles at the minimum and maximum, a dotted line at the mean. The setting
measurementDataViewer.cursorStatisticsturns these marks off.
With more curves than the table can show, its rows scroll: its header and the row of the X of the cursors stay in view.
A small diamond marks where each cursor crosses each curve, on the sample whose value the table gives: filled at C1, hollow at C2. It shows where a cursor stands on every curve while you move it.
Move the cursors:
-
click in the plots to move the active one;
-
drag C1 or C2;
-
← and → move the active cursor by one sample, Shift + ← and Shift + → faster, by ten pixels at the zoom of the chart, to the nearest sample;
-
1 and 2 choose the active cursor.
The cursors are linked with the grid of values: see Linked with the charts.
Images
Image in the toolbar saves the chart as an SVG or PNG image, next to the file by default: the plots, their legends and axes, and the measurement cursors with their table when they are shown.
-
The images have the colours of VS Code by default, as the chart looks on the screen.
-
The setting
measurementDataViewer.imageThememakes themlight, for documents and reports, ordark, whatever the theme of VS Code. -
PNG images are twice the size of the chart on the screen.
- For a slide or a report
-
The items under For a slide or a report save an image of 1280 × 720 (a 16:9 slide; PNG images twice that size), with text of 14 to 16 px that stays readable once the image is scaled down. The name of each curve is written at its end instead of the legend.
Large channels
A curve of more than 4 million samples is drawn from an overview that the extension computes once, in the background: a few seconds for 357 million samples, its progress shown in the chart. The chart then shows it at any zoom at once, and refines the details; it says Refining a curve… (or Refining 2 curves…, and so on) while they are on their way. The values under the cursors and the statistics between them stay exact.
See Large files.