    Create the independent axis for a 2D data set.

dataspace2d(dims, id=None, dstype=DataIMG)
dims - sequence of 2 number
id - int or str, optional
dstype - data class to use, optional

Create an "empty" two-dimensional data set by defining the grid on which the points are defined (the independent axis). The values are set to 0.

Create a 200 pixel by 150 pixel grid (number of columns by number of rows) and display it (each pixel has a value of 0):

>>> dataspace2d([200, 150]) >>> image_data()

Create a data space called "fakeimg":

>>> dataspace2d([nx, ny], id="fakeimg")

PARAMETERS

The parameters for this function are:

Parameter
Definition
dims
The dimensions of the grid in (width,height) order.
id
The identifier for the data set to use. If not given then the default identifier is used, as returned by

`get_default_id` .
dstype
What type of data is to be used. Supported values include

`DataIMG` (the default), `Data2D` , and `Data2DInt` .

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023