GridLayout

(Source code, png, hires.png, pdf)

../../_images/GridLayout.png
class GridLayout(*args)

Organize subgraphs in a grid.

Parameters
nb_rowsint

Number of grid rows

nb_colsint

Number of grid columns

Examples

>>> import openturns as ot
>>> grid = ot.GridLayout(2, 3)
>>> for j in range(grid.getNbColumns()):
...    beta = 1.0 + j
...    grid.setGraph(0, j, ot.Gumbel(beta, 0.0).drawPDF())
...    grid.setGraph(1, j, ot.Gumbel(beta, 0.0).drawCDF())

Methods

getClassName()

Accessor to the object’s name.

getGraph(i, j)

Subgraph accessor (grid layout only).

getId()

Accessor to the object’s id.

getName()

Accessor to the object’s name.

getNbColumns()

Column count accessor (grid layout only).

getNbRows()

Row count accessor (grid layout only).

getShadowedId()

Accessor to the object’s shadowed id.

getTitle()

Accessor to the title.

getVisibility()

Accessor to the object’s visibility state.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

setAxes(showAxes)

Accessor to the indication of axes’ presence on the Graph.

setGraph(i, j, elt)

Subgraph accessor (grid layout only).

setLegendPosition(position)

Accessor to the legend’s position of the subgraphs.

setName(name)

Accessor to the object’s name.

setShadowedId(id)

Accessor to the object’s shadowed id.

setTitle(title)

Accessor to the title.

setVisibility(visible)

Accessor to the object’s visibility state.

__init__(*args)

Initialize self. See help(type(self)) for accurate signature.

getClassName()

Accessor to the object’s name.

Returns
class_namestr

The object class name (object.__class__.__name__).

getGraph(i, j)

Subgraph accessor (grid layout only).

Parameters
iint

Row index

jint

Column index

Returns
graphGraph

Subgraph at (i, j).

getId()

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getName()

Accessor to the object’s name.

Returns
namestr

The name of the object.

getNbColumns()

Column count accessor (grid layout only).

Returns
nb_rowsint

Number of grid columns.

getNbRows()

Row count accessor (grid layout only).

Returns
nb_rowsint

Number of grid rows.

getShadowedId()

Accessor to the object’s shadowed id.

Returns
idint

Internal unique identifier.

getTitle()

Accessor to the title.

Returns
titlestr

Graph title.

getVisibility()

Accessor to the object’s visibility state.

Returns
visiblebool

Visibility flag.

hasName()

Test if the object is named.

Returns
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns
hasVisibleNamebool

True if the name is not empty and not the default one.

setAxes(showAxes)

Accessor to the indication of axes’ presence on the Graph.

Parameters
axesbool

True to draw the axes, False to hide the axes.

setGraph(i, j, elt)

Subgraph accessor (grid layout only).

Parameters
iint

Row index

jint

Column index

graphGraph

Subgraph at (i, j).

setLegendPosition(position)

Accessor to the legend’s position of the subgraphs.

Parameters
positionstr

Legend’s position used for the subgraphs contained inside the Graph.

setName(name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters
idint

Internal unique identifier.

setTitle(title)

Accessor to the title.

Parameters
titlestr

Graph title.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters
visiblebool

Visibility flag.