Package tech.tablesaw.plotly.components
Class Grid.GridBuilder
- java.lang.Object
-
- tech.tablesaw.plotly.components.Grid.GridBuilder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Grid
build()
Grid.GridBuilder
columns(int columns)
The number of columns in the grid.Grid.GridBuilder
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`.Grid.GridBuilder
rowOrder(Grid.RowOrder rowOrder)
Grid.GridBuilder
rows(int rows)
The number of rows in the grid.Grid.GridBuilder
xGap(double xGap)
Horizontal space between grid cells, expressed as a fraction of the total width available to one cell.Grid.GridBuilder
xSide(Grid.XSide xSide)
Sets where the x axis labels and titles go.Grid.GridBuilder
yGap(double yGap)
Vertical space between grid cells, expressed as a fraction of the total height available to one cell.Grid.GridBuilder
ySide(Grid.YSide ySide)
Sets where the y axis labels and titles go.
-
-
-
Method Detail
-
rows
public Grid.GridBuilder rows(int 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
public Grid.GridBuilder columns(int 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
public Grid.GridBuilder xGap(double 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
public Grid.GridBuilder yGap(double 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
public Grid.GridBuilder ySide(Grid.YSide 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
public Grid.GridBuilder xSide(Grid.XSide 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
public Grid.GridBuilder rowOrder(Grid.RowOrder rowOrder)
-
pattern
public Grid.GridBuilder 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`.- Parameters:
pattern
- defaults to COUPLED- Returns:
- this GridBuilder
-
build
public Grid build()
-
-