subplots

sisl.viz.subplots(*figures: Figure, rows: int | None = None, cols: int | None = None, arrange: Literal['rows', 'cols', 'square'] = 'rows', backend: Literal['plotly', 'matplotlib', 'py3dmol', 'blender'] = 'plotly', **kwargs) Figure[source]

Combines multiple plots into a single figure using subplots.

Parameters:
  • *figures (Figure) – The figures (or plots) to combine.

  • rows (int, optional) – The number of rows in the subplots grid. If not specified, it will be inferred automatically based on the number of columns and the number of plots. If neither rows nor cols are specified, the arrange parameter will be used to determine the number of rows and columns.

  • cols (int, optional) – The number of columns in the subplots grid. If not specified, it will be inferred automatically based on the number of rows and the number of plots. If neither rows nor cols are specified, the arrange parameter will be used to determine the number of rows and columns.

  • arrange ({"rows", "cols", "square"}, optional) – Determines number of rows and columns if neither rows nor cols are specified. If arrange is “rows”, the number of rows will be equal to the number of plots. If arrange is “cols”, the number of columns will be equal to the number of plots. If arrange is “square”, the number of rows and columns will be equal to the square root of the number of plots,

  • backend ({"plotly", "matplotlib", "py3dmol", "blender"}, optional) – The backend to use for the merged figure.

  • **kwargs – Additional arguments that will be passed to the _init_figure_* method of the Figure class. The arguments accepted here are basically backend specific, but for subplots all backends should support rows and cols to specify the number of rows and columns of the subplots, and arrange which controls the arrangement (“rows”, “cols” or “square”).

See also

merge_plots

The function that is called to merge the plots.