Interface: LayoutGrid
A grid of subplots (Plotly layout.grid). Cartesian axes placed in the grid get their domain, anchor, side and position defaults from their cell; domain traces (pie, …) are placed with domain.row / domain.column. Values given on an axis or a trace always win.
Properties
| Property | Type | Default value | Description |
|---|---|---|---|
columns? | number | undefined | Number of columns. Defaults to the length of subplots[0] or xaxes. Range: 1 – 100 |
domain? | LayoutGridDomain | undefined | The part of the plot area the grid fills. |
pattern? | "independent" | "coupled" | "coupled" | Default cell contents when neither subplots nor xaxes/yaxes is given: coupled shares one x axis per column and one y axis per row (xaxes: ['x', 'x2', …], yaxes: ['y', 'y2', …]); independent gives every cell its own pair ('xy', 'x2y2', … in row-major order). |
roworder? | "top to bottom" | "bottom to top" | "top to bottom" | Whether row 0 (of subplots, yaxes and trace domain.row) is the top row or the bottom row. |
rows? | number | undefined | Number of rows. Defaults to the length of subplots or yaxes. A grid needs more than one cell (rows * columns > 1); otherwise it is ignored. Range: 1 – 100 |
subplots? | readonly readonly string[][] | undefined | The cartesian subplot of each cell, as a 2D array [row][column] of ids like 'xy' or 'x2y3', or '' for an empty cell. All cells of a column must share one x axis and all cells of a row one y axis; a subplot that breaks this, or that no trace or axis creates, leaves its cell empty. Takes precedence over xaxes/yaxes. With pattern: 'independent' and no arrays, it defaults to 'xy', 'x2y2', … in row-major order. |
xaxes? | readonly string[] | undefined | The x axis of each column ('x', 'x2', …, or '' for none), used when there is no subplots array. Defaults to 'x', 'x2', … for pattern: 'coupled'. |
xgap? | number | undefined | Horizontal space between columns, as a fraction of a column width. Defaults to 0.2 for a grid of independent subplots (subplots or pattern: independent), 0.1 otherwise. Range: 0 – 1 |
xside? | "top" | "bottom" | "bottom plot" | "top plot" | "bottom plot" | Where the x axes are drawn by default: bottom plot / top plot against the bottom-most / top-most subplot of their column; bottom / top at the bottom / top edge of the grid (anchor: 'free'), even when that cell is empty. |
yaxes? | readonly string[] | undefined | The y axis of each row ('y', 'y2', …, or '' for none), used when there is no subplots array. Defaults to 'y', 'y2', … for pattern: 'coupled'. |
ygap? | number | undefined | Vertical space between rows, as a fraction of a row height. Defaults to 0.3 for a grid of independent subplots (subplots or pattern: independent), 0.1 otherwise. Range: 0 – 1 |
yside? | "left" | "right" | "left plot" | "right plot" | "left plot" | Where the y axes are drawn by default: left plot / right plot against the left-most / right-most subplot of their row; left / right at the left / right edge of the grid (anchor: 'free'), even when that cell is empty. |