Package tech.tablesaw.plotly.components
Class Grid.GridBuilder
java.lang.Object
tech.tablesaw.plotly.components.Grid.GridBuilder
- Enclosing class:
- Grid
-
Method Summary
Modifier and TypeMethodDescriptionbuild()columns(int columns) The number of columns in the grid.pattern(Grid.Pattern pattern) If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,', 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`.rowOrder(Grid.RowOrder rowOrder) rows(int rows) The number of rows in the grid.xGap(double xGap) Horizontal space between grid cells, expressed as a fraction of the total width available to one cell.xSide(Grid.XSide xSide) Sets where the x axis labels and titles go.yGap(double yGap) Vertical space between grid cells, expressed as a fraction of the total height available to one cell.ySide(Grid.YSide ySide) Sets where the y axis labels and titles go.
-
Method Details
-
rows
The number of rows in the grid. If you provide a 2D `subplots` array or a `yaxes` array, 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.- Parameters:
rows- an integer greater than or equal to 1- Returns:
- this GridBuilder
-
columns
The number of columns in the grid. If you provide a 2D `subplots` array, the length of its longest row is used as the default. If you give an `xaxes` array, 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.- Parameters:
columns- an integer greater than or equal to 1- Returns:
- this GridBuilder
-
xGap
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.- Parameters:
xGap- a double >= 0 && <= 1- Returns:
- this GridBuilder
-
yGap
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.- Parameters:
yGap- a double >= 0 && <= 1- Returns:
- this GridBuilder
-
ySide
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. -
xSide
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. -
rowOrder
-
pattern
If no `subplots`, `xaxes`, or `yaxes` are given but we do have `rows` and `columns`,', 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`.- Parameters:
pattern- defaults to COUPLED- Returns:
- this GridBuilder
-
build
-