ILNumerics - Technical Computing

Modern High Performance Tools for Technical

Computing and Visualization in Industry and Science

 

Plotting Types for Debug Data

The ILNumerics Array Visualizer is a new tool window for Visual Studio – similar to a graphical watch window. During your debug session it connects to the Visual Studio Debug Engine and allows to visualize the results of arbitrary expressions: variables, arrays, pointers. Results are plotted in various ways as 2D and 3D charts, following updates to your data in each debug step automatically. The Array Visualizer is available for C#, Visual Basic, F#, C/C++ and FORTRAN, for 32/64 bit. General introductory documentation of common Array Visualizer concepts is found here. This article introduced the various plot options for visualizing your debug data.

Plotting Types

The Array Visualizer enables individual plot types depending on the shape of the expression result. Enabled types can be selected from the bottom row of the Array Visualizer tool window. Types which are not available for the current array expression result are grayed out.

The following types are available:

Text Output

The text ouput is the default output type. It gives a simple string representation of the data and is always available - independently from the debug data array shape / type. Multidimensional arrays are displayed as 2D slices along the 1-2 dimensions, in a tabular format. Text output serves as a fallback for all expressions, which cannot visualized by any graphical means.

Line Output

Available for row and column vectors, matrices of 1...3 rows. A single line is displayed as Y, X-Y or X-Y-Z plot - depending on the number of rows provided.

Example:

Let the variable V correspond to a vector with 31 elements:

Scatter Plot

Available for matrices of size 1xn (single row), 2xn and 3xn. Individual points are drawn at the 3D positions according to the array data found in the columns of the provided matrix. For single row vectors, the data represent the X coordinates, Y and Z data are optional and taken from the 2nd and 3rd row:

Multiple Lines Plot

Available for non-empty matrices. The rows of the matrix are visualized as individual line plots. By default, the Array Visualizer limits the number of lines displayed by 50. This number is configurable in the ILNumerics section of the Visual Studio options dialog.

Surface Plot

Available for non-empty, non-vector sized matrices, i.e. matrices with at least two rows and two columns. The matrix is displayed as surface plot. Each element of the matrix represents a grid point of the surface, intermediate tile areas between grid points are linearly interpolated.

ImageSC Plot

Available for non-empty matrices. Each element represents a colored tile in the imagesc plot:

Bar Plot

Available for non-empty matrices and vectors. Data are displayed as bar plots in several configurations, including grouped, stacked and 3D bar plots.

 

Whenever the shape of the result matches one of the required shapes of an output type, the corresponding button is enabled and the output type can be selected by the user. The state of individual plots and their configuration is maintained when switching between output types. This allows one to compare the same data by several views by quickly switching between output panels.