View»Graphical Array View

Use the Graphical Array View command to view the values of arrays in a graph. You can view arrays in a graph only while you are debugging and only with 1D and 2D arrays. From the Variables and Call Stack window or Watch window, right-click and select View»Graphical Array View to open the Graphical Array View for the currently highlighted array. You also can drop a variable from the Source, Variables and Call Stack, or Watch window onto the Graphical Array View.

You can have multiple windows open at the same time. Click the corresponding tab in the Debugging Region or you can select Window»Graphical Array View to select among open windows.

Interacting with the Graphical Array View

You can zoom and pan the graph. Zooming and panning is available only for 1D arrays. To zoom, press <Ctrl> and click and hold the left mouse button. The mouse pointer becomes a cross-hair pointer. As you drag the mouse, a rectangle defines the new limits of the graph. When you are satisfied with the new boundaries of the graph, release the mouse button. To zoom out, press <Ctrl> and right-click the graph. To pan, press <Ctrl-Shift>, click and hold the left mouse button, and drag the mouse to a new point. The graph viewport scrolls so that a new portion of the graph is visible. You can drag the mouse anywhere on the graph, even beyond the viewport.

You also can double-click the minimum or maximum axis label values to edit them. When you modify the value, the axis range changes based on the new value. If you double-click a label value that is not the minimum or maximum, the graph does not change.

If you modify a label value so that the minimum value becomes greater than or equal to the maximum value (or so that the maximum value becomes less than or equal to the minimum value), LabWindows/CVI pans the axis range. For example, if a graph has an x-axis range with 0 as the minimum and 10 as the maximum, and you change the minimum to 20, LabWindows/CVI displays the graph so that its x-axis ranges from 20 to 30.

To return the graph to its original state, right-click the Graphical Array View and select Reset graph from the context menu.

You can release the Graphical Array View from the Debugging Region. To view the released Graphical Array View and your source code at the same time, right-click the Graphical Array View and select Floating window from the context menu. The Floating window option keeps the Graphical Array View on top of all other windows on your desktop. This option is disabled when the Graphical Array View is confined.

1D Arrays

The following figure shows a Graphical Array View for a 1D array.

For a 1D array, the Graphical Array View shows a single plot. To find the value of a point, move the cross-hair pointer over any point in the graph. The Cursor field displays the value of the point at the specified cursor location. When values change during debugging, the graph auto scales to fit the updated values.

You can customize the appearance of the graph with the following options:

  • Point Style—Selects the style in which points appear.
  • Line Style—Selects the style in which lines appear.
  • Interleaved Arrays—Displays the data as an interleaved array of contiguous sets of points. The maximum number of points you can select is half the number of elements in your array. The following figure illustrates an interleaved 1D array.

2D Arrays

The following figure shows the Graphical Array View for a 2D array.

A graph for a 2D array is an intensity plot. The different shades of gray represent the magnitude of the points. Darker shades represent lower values, and lighter shades represent higher values. The color scale uses the standard spectrum. The following colors are organized from highest value to lowest value.

  1. White
  2. Red
  3. Yellow
  4. Green
  5. Cyan
  6. Blue
  7. Magenta
  8. Black

The x-axis represents the first dimension of the array. The y-axis represents the second dimension of the array.

To customize the appearance of the graph, select different color scales from the Color Scale option.

WAS THIS ARTICLE HELPFUL?

Not Helpful