GridLayout

(Source code, svg)

../../_images/GridLayout.svg
class GridLayout(nbRows=0, nbColumns=0)

Organize subgraphs in a grid.

Parameters:
nb_rowsint

Number of grid rows

nb_colsint

Number of grid columns

Methods

add(grid)

Add subgraphs from a different grid to the corresponding subgraphs in the current grid.

getClassName()

Accessor to the object's name.

getGraph(i, j)

Subgraph accessor (grid layout only).

getGraphCollection()

Accessor to the collection of graphs.

getName()

Accessor to the object's name.

getNbColumns()

Column count accessor (grid layout only).

getNbRows()

Row count accessor (grid layout only).

getTitle()

Accessor to the title.

hasName()

Test if the object is named.

setAxes(showAxes)

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

setGraph(i, j, elt)

Subgraph accessor (grid layout only).

setGraphCollection(coll)

Accessor to the collection of graphs.

setLayout(nbRows, nbColumns)

Accessor to the layout.

setLegendPosition(position)

Accessor to the legend's position of the subgraphs.

setName(name)

Accessor to the object's name.

setTitle(title)

Accessor to the title.

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())
__init__(nbRows=0, nbColumns=0)
add(grid)

Add subgraphs from a different grid to the corresponding subgraphs in the current grid.

Parameters:
gridGridLayout

GridLayout containing the subgraphs to add.

Notes

Only works if both grids have the same number of rows and columns, because the (i,j)-th graph of the provided grid is added to the (i,j)-th graph of the original grid with the add() method.

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).

getGraphCollection()

Accessor to the collection of graphs.

Returns:
collCollection of Graph

The graphs stored into the GridLayout.

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.

getTitle()

Accessor to the title.

Returns:
titlestr

Graph title.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

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).

setGraphCollection(coll)

Accessor to the collection of graphs.

Parameters:
collsequence of Graph

The graphs to store into the GridLayout. The collection must have at most nbRows\times nbColumns elements.

setLayout(nbRows, nbColumns)

Accessor to the layout.

Parameters:
nbRowsint

The new number of rows.

nbColumnsint

The new number of columns.

Notes

If the new layout contains fewer graphs than the old layout, the remaining graphs are removed from the layout.

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.

setTitle(title)

Accessor to the title.

Parameters:
titlestr

Graph title.

Examples using the class

Bayesian calibration of a computer code

Bayesian calibration of a computer code

Bayesian calibration of the flooding model

Bayesian calibration of the flooding model

Linear Regression with interval-censored observations

Linear Regression with interval-censored observations

Bayesian calibration of hierarchical fission gas release models

Bayesian calibration of hierarchical fission gas release models

Posterior sampling using a PythonDistribution

Posterior sampling using a PythonDistribution

Calibration of the Chaboche mechanical model

Calibration of the Chaboche mechanical model

Calibration of the deflection of a tube

Calibration of the deflection of a tube

Calibration of the flooding model

Calibration of the flooding model

Calibration of the logistic model

Calibration of the logistic model

Calibrate a parametric model: a quick-start guide to calibration

Calibrate a parametric model: a quick-start guide to calibration

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on the Fremantle sea-levels data

Estimate a GEV on the Venice sea-levels data

Estimate a GEV on the Venice sea-levels data

Estimate a GPD on the Dow Jones Index data

Estimate a GPD on the Dow Jones Index data

Estimate a GPD on the daily rainfall data

Estimate a GPD on the daily rainfall data

Estimate a GPD on the Wooster temperature data

Estimate a GPD on the Wooster temperature data

Fit a non parametric distribution

Fit a non parametric distribution

Bandwidth sensitivity in kernel smoothing

Bandwidth sensitivity in kernel smoothing

Estimate tail dependence coefficients on the wave-surge data

Estimate tail dependence coefficients on the wave-surge data

Estimate tail dependence coefficients on the wind data

Estimate tail dependence coefficients on the wind data

Visualize clouds

Visualize clouds

Visualize pairs between two samples

Visualize pairs between two samples

Visualize pairs

Visualize pairs

Getting started

Getting started

Gaussian Process Regression vs KrigingAlgorithm

Gaussian Process Regression vs KrigingAlgorithm

A quick start guide to graphs

A quick start guide to graphs

Over-fitting and model selection

Over-fitting and model selection

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression: choose a polynomial trend on the beam model

Gaussian Process Regression : cantilever beam model

Gaussian Process Regression : cantilever beam model

Create a polynomial chaos metamodel by integration on the cantilever beam

Create a polynomial chaos metamodel by integration on the cantilever beam

Conditional expectation of a polynomial chaos expansion

Conditional expectation of a polynomial chaos expansion

Validate a polynomial chaos

Validate a polynomial chaos

Create a polynomial chaos for the Ishigami function: a quick start guide to polynomial chaos

Create a polynomial chaos for the Ishigami function: a quick start guide to polynomial chaos

Plot enumeration rules

Plot enumeration rules

Create a Point Conditional Distribution

Create a Point Conditional Distribution

Compare frequentist and Bayesian estimation

Compare frequentist and Bayesian estimation

Quick start guide to distributions

Quick start guide to distributions

Use the Ratio of Uniforms algorithm to sample a distribution

Use the Ratio of Uniforms algorithm to sample a distribution

Plot the Smolyak quadrature

Plot the Smolyak quadrature

Plot Smolyak multi-indices

Plot Smolyak multi-indices

Estimate Sobol’ indices for the Ishigami function by a sampling method: a quick start guide to sensitivity analysis

Estimate Sobol' indices for the Ishigami function by a sampling method: a quick start guide to sensitivity analysis

Example of sensitivity analyses on the wing weight model

Example of sensitivity analyses on the wing weight model