Grid
public struct Grid : Encodable
Undocumented
-
The number of rows in the grid.
If you provide a 2D
subplotsarray or ayaxesarray, its length is used as the default. But it’s also possible to have a different length, if you want to leave a row at the end for non-cartesian subplots.Declaration
Swift
public var rows: Int? -
Is the first row the top or the bottom? Note that columns are always enumerated from left to right.
See moreDeclaration
Swift
public enum RowOrder : String, Encodable -
Is the first row the top or the bottom? Note that columns are always enumerated from left to right.
Declaration
Swift
public var rowOrder: RowOrder? -
The number of columns in the grid.
If you provide a 2D
subplotsarray, the length of its longest row is used as the default. If you give anxaxesarray, its length is used as the default. But it’s also possible to have a different length, if you want to leave a row at the end for non-cartesian subplots.Declaration
Swift
public var columns: Int? -
Used for freeform grids, where some axes may be shared across subplots but others are not.
Each entry should be a cartesian subplot id, like xy or x3y2, or ** to leave that cell empty. You may reuse x axes within the same column, and y axes within the same row. Non-cartesian subplots and traces that support
domaincan place themselves in this grid separately using thegridcellattribute.Declaration
Swift
public var subplots: InfoArray? -
Used with
yaxeswhen the x and y axes are shared across columns and rows.Each entry should be an x axis id like x, x2, etc., or ** to not put an x axis in that column. Entries other than ** must be unique. Ignored if
subplotsis present. If missing butyaxesis present, will generate consecutive IDs.Declaration
Swift
public var xAxes: InfoArray? -
Used with
yaxeswhen the x and y axes are shared across columns and rows.Each entry should be an y axis id like y, y2, etc., or ** to not put a y axis in that row. Entries other than ** must be unique. Ignored if
subplotsis present. If missing butxaxesis present, will generate consecutive IDs.Declaration
Swift
public var yAxes: InfoArray? -
If no
subplots,xaxes, oryaxesare given but we do haverowsandcolumns, we can generate defaults using consecutive axis IDs, in two ways: coupled gives one x axis per column and one y axis per row.independent uses a new xy pair for each cell, left-to-right across each row then iterating rows according to
See moreroworder.Declaration
Swift
public enum Pattern : String, Encodable -
If no
subplots,xaxes, oryaxesare given but we do haverowsandcolumns, we can generate defaults using consecutive axis IDs, in two ways: coupled gives one x axis per column and one y axis per row.independent uses a new xy pair for each cell, left-to-right across each row then iterating rows according to
roworder.Declaration
Swift
public var pattern: Pattern? -
Horizontal space between grid cells, expressed as a fraction of the total width available to one cell.
Defaults to 0.1 for coupled-axes grids and 0.2 for independent grids.
Declaration
Swift
public var xGap: Double? -
Vertical space between grid cells, expressed as a fraction of the total height available to one cell.
Defaults to 0.1 for coupled-axes grids and 0.3 for independent grids.
Declaration
Swift
public var yGap: Double? -
Undocumented
See moreDeclaration
Swift
public struct Domain : Encodable -
Undocumented
Declaration
Swift
public var domain: Domain? -
Sets where the x axis labels and titles go.
bottom means the very bottom of the grid. bottom plot is the lowest plot that each x axis is used in. top and top plot are similar.
See moreDeclaration
Swift
public enum XSide : String, Encodable -
Sets where the x axis labels and titles go.
bottom means the very bottom of the grid. bottom plot is the lowest plot that each x axis is used in. top and top plot are similar.
Declaration
Swift
public var xSide: XSide? -
Sets where the y axis labels and titles go.
left means the very left edge of the grid. left plot is the leftmost plot that each y axis is used in. right and right plot are similar.
See moreDeclaration
Swift
public enum YSide : String, Encodable -
Sets where the y axis labels and titles go.
left means the very left edge of the grid. left plot is the leftmost plot that each y axis is used in. right and right plot are similar.
Declaration
Swift
public var ySide: YSide? -
Creates
Gridobject with specified properties.Declaration
Parameters
rowsThe number of rows in the grid.
rowOrderIs the first row the top or the bottom? Note that columns are always enumerated from left to right.
columnsThe number of columns in the grid.
subplotsUsed for freeform grids, where some axes may be shared across subplots but others are not.
xAxesUsed with
yaxeswhen the x and y axes are shared across columns and rows.yAxesUsed with
yaxeswhen the x and y axes are shared across columns and rows.patternxGapHorizontal space between grid cells, expressed as a fraction of the total width available to one cell.
yGapVertical space between grid cells, expressed as a fraction of the total height available to one cell.
domainxSideSets where the x axis labels and titles go.
ySideSets where the y axis labels and titles go.
View on GitHub
Install in Dash
Grid Structure Reference