Skip to content

Layout(rows, columns) Source

Grid of cells of a Figure, each cell holding a Plot or left blank.

Added in version 0.1.0

Parameters:

  • rows (int)

    The number of rows of cells, at least 1.

  • columns (int)

    The number of columns of cells, at least 1.

Raises:

Examples:

import numdaplot as ndp

prices = ndp.Array.from_list([12.0, 15.5, 14.0, 17.0])
line_plot = ndp.Plot.line(prices)
bar_plot = ndp.Plot.bar(prices)
layout = ndp.Layout(rows=2, columns=1)
figure = ndp.Figure(layout)
figure = figure.place(line_plot, ndp.Cell(row=0, column=0))
figure = figure.place(bar_plot, ndp.Cell(row=1, column=0))
figure.show()

Plot drawn by the example