XY charts
An XY chart plots channels against another channel of the same length, sample by sample, such as a force against a displacement.
Open an XY chart
-
Open XY chart in a group tab;
-
the button next to the chart button in the editor title bar of the viewer;
-
Measurement Data: Open XY Chart in the Command Palette.
The XY chart opens in a tab of its own, which VS Code restores after a restart.
Choose the X and the curves
-
Choose the X of the chart at the top of the list of channels.
-
Tick the channels to plot against it. Only channels of the length of the X can be ticked; the others are marked "≠".
-
To plot a channel against another X of its length, choose it in the menu of the channel: several pairs, of different lengths, fit in one chart. In the screenshot above, Force 2 is plotted against Displacement 2, Force 1 against the X of the chart, Displacement 1.
XY charts plot numeric channels only: timestamps, Booleans and text "cannot be plotted".
Lines or points
Lines |
Lines join the samples in their order in the file. |
Points |
The samples are drawn alone, for clouds of points. |
One plot per unit, or all in one, as in time charts.
Navigate
The XY chart zooms as a map:
| Gesture | Action |
|---|---|
Mouse wheel |
Zoom X and Y around the pointer. |
Shift + wheel |
Zoom X only. |
Ctrl + wheel (a pinch) |
Zoom Y only. |
Drag |
Pan. |
Double click |
Show everything. |
The cursor chart
Under the plots, the cursor chart shows a channel of the length of the curves against its time: the X of the chart by default, any other one from its menu.
- Point at a row
-
The mouse over the cursor chart points at a row. The XY chart marks the sample of each curve at that row, gives its Y in the legend and its X on the axis. The grid of values marks its cells and scrolls to them (Follow the charts); the mouse over a cell of the grid moves the cursor to its row.
- Show a part of the test
-
A zoom or a pan on the cursor chart, with the gestures of the time charts, makes the XY chart draw the samples of the visible range only.
Cursor in the toolbar hides it; the XY chart then draws all the samples.
Select ranges of samples
Select ranges of samples, such as some cycles of a test: the XY chart draws them, each apart, without a line from the end of a range to the start of the next.
| Gesture on the cursor chart | Action |
|---|---|
Drag, while it shows all the data |
Select a range. |
Shift + drag |
Add another range, also when it is zoomed. |
Shift + click on a range |
Remove it. |
Click |
Remove all the ranges. |
Clear ranges removes them too. The line above the cursor chart gives the number of ranges and of samples drawn. Choosing another channel for the cursor chart keeps the rows shown and the ranges selected.
Curves of any size
-
A curve whose drawing would keep more than 50,000 samples is drawn as a density image: its colour is stronger where the curve passes more often, such as the many cycles of an endurance test.
-
A pair of more than 4 million samples is drawn by the extension from the file, without being sent to the chart: 5 seconds for 100 million samples on a recent laptop.
-
Ranges of samples are read from the file only, also for these pairs.
Images
Image in the toolbar saves the XY chart as an SVG or PNG image, density images included, as for the time charts, with the setting measurementDataViewer.imageTheme.