CGrid:Class Definition
The CGrid works with data in the 2-dimensional tabular form of a data grid. The CGrid class works with a Mira CTableView Window. It can use the default "Grid" pane of the Script Editor or an existing CTableView window created by some other means.
The following functions are provided to expedite plotting of data when the values to be plotted are in arrays. The functions also can plot x and y error bars. They return an instance of a CGrid object to the script for additional use. These functions are compared here.
Global form of the new method used to create a new CGrid object |
|
Attaches the default grid provided by the Script Editor window. |
|
Attaches an existing grid window to the script. |
Construction |
Object = CGrid:new() Alternatvely, use one of the global functions listed above. |
Destruction |
Object:delete() |
Creates a new instance of a CGrid object. |
|
Deletes a CGrid object. |
|
Attaches the top-most window (a grid window) to the script and creates a new CGrid class object for it. |
These methods work with grid configuration. Note: A new grid has 1 sheet by default.
Set the number of columns, rows, and sheets. |
|
Sets the number of columns in the grid. |
|
Sets the number of rows in the grid. |
|
Sets the number of sheets in the grid. |
|
Returns the number of columns in the grid. |
|
Returns the number of rows in the grid. |
|
Returns the number of sheets in the grid. |
|
Selects the current sheet, from 1 to GetNumSheets. |
|
Deletes a sheet from the grid. |
These methods work with data in the grid.
Sets the data in a cell. |
|
Sets a column of data using data in a lua array. |
|
Sets a row of data using data in a lua array. |
|
Returns the data from a cell. |
|
Returns a column of data as a lua array. |
|
Returns a row of data as a lua array. |
Operations on Grids
GetHandle |
|
|