2.7.2.4 Virtual Matrix

Data arranged in a group of worksheet cells can be treated as a matrix and various plots such as 3D Surface, 3D Bars, and Contour can be created from such data. This feature is referred to as Virtual Matrix. The X and Y coordinate values can be optionally contained in the block of data in the first column and row, or also in a header row of the worksheet.

Whereas Matrix objects in Origin only support linear mapping of X and Y coordinates, a virtual matrix supports nonlinear or unevenly spaced coordinates for X and Y.

The virtual matrix is defined when data in the worksheet is used to create a plot. The plotvm X-Function should be used to create plots.

The following example shows how to use the plot_vm X-Function:

// Create a new workbook and import sample data
newbook;
string fname$=system.path.program$ + "Samples\Graphing\VSurface 1.dat";
impasc;
// Treat entire sheet as a Virtual Matrix and create a colormap surface plot
plotvm irng:=1! format:=xacross rowpos:=selrow1 colpos:=selcol1
 ztitle:="VSurface 1" type:=242 ogl:=<new template:=cmap>;
// Change X axis scale to log
layer.x.type=2;