Skip to content

gggrid

gggrid(
    plots: list,
    ncol: int | None = None,
    *,
    sharex: str | bool | None = None,
    sharey: str | bool | None = None,
    widths: list | None = None,
    heights: list | None = None,
    hspace: float | None = None,
    vspace: float | None = None,
    fit: bool | None = None,
    align: bool | None = None,
    guides: str | None = None,
) -> SupPlotsSpec

Combine plots into a grid.

Parameters:

  • plots (list) –

    PlotSpec or SupPlotsSpec objects; None leaves a cell empty.

  • ncol (int, default: None ) –

    Number of columns; all plots in one row when None.

  • sharex (bool or {all, none, row, col}, default: None ) –

    Share axis limits between plots.

  • sharey (bool or {all, none, row, col}, default: None ) –

    Share axis limits between plots.

  • widths (list of float, default: None ) –

    Relative column widths and row heights.

  • heights (list of float, default: None ) –

    Relative column widths and row heights.

  • hspace (float, default: None ) –

    Gaps between cells in pixels.

  • vspace (float, default: None ) –

    Gaps between cells in pixels.

  • fit (bool, default: None ) –

    Stretch each plot to its cell.

  • align (bool, default: None ) –

    Align inner panels.

  • guides ((auto, collect, keep), default: "auto" ) –

    Whether identical legends are collected into one.

Returns: