Skip to content

CellOutOfRangeError(row, column, row_count, column_count) Source

Bases: NumdaplotError

Raised when a Cell, or a cell it spans, is beyond the rows or the columns of the Layout of a Figure.

Added in version 0.1.0

Parameters:

  • row (int)

    The row of the cell, from 0.

  • column (int)

    The column of the cell, from 0.

  • row_count (int)

    The number of rows of the Layout.

  • column_count (int)

    The number of columns of the Layout.

Attributes:

  • row

    The row of the cell, from 0.

  • column

    The column of the cell, from 0.

  • row_count

    The number of rows of the Layout.

  • column_count

    The number of columns of the Layout.

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([12.0, 15.5, 14.0])
plot = ndp.Plot.line(prices)
figure = ndp.Figure(ndp.Layout(rows=2, columns=2))
try:
    figure.place(plot, ndp.Cell(row=2, column=0))
except ndp.CellOutOfRangeError as error:
    print(error)
# Cell (2, 0) is outside a Layout of 2 rows and 2 columns.