tacco.plots.subplots

subplots(n_x=1, n_y=1, axsize=(5, 5), hspace=0.15, wspace=0.15, x_padding=None, y_padding=None, title=None, sharex='none', sharey='none', width_ratios=None, height_ratios=None, x_shifts=None, y_shifts=None, dpi=None, **kwargs)[source]

Creates a new figure with a grid of subplots. This is a convenience wrapper around matplotlib.pyplot.subplots() with parameters for axis instead of figure and absolute instead of relative units.

Parameters:
  • n_x – Number of plots in horizontal/x direction

  • n_y – Number of plots in vertical/y direction

  • axsize – Size of a single axis in the plot

  • hspace – Relative vertical spacing between plots

  • wspace – Relative horizontal spacing between plots

  • x_padding – Absolute horizontal spacing between plots; this setting overrides wspace; if None, use the value from wspace

  • y_padding – Absolute vertical spacing between plots; this setting overrides hspace; if None, use the value from hspace

  • title – Sets the figure suptitle

  • sharex – Parameter for sharing the x-axes between the subplots; see the documentation of matplotlib.pyplot.subplots()

  • sharey – Parameter for sharing the y-axes between the subplots; see the documentation of matplotlib.pyplot.subplots()

  • width_ratios – Sets the ratios of widths for the columns of the subplot grid keeping the width of the widest column; if None, all columns have the same width

  • height_ratios – Sets the ratios of heights for the rows of the subplot grid keeping the height of the highest row; if None, all rows have the same height

  • x_shifts – The absolute shifts in position in horizontal/x direction per column of subplots; if None, the columns are not shifted

  • y_shifts – The absolute shifts in position in vertical/y direction per row of subplots; if None, the rows are not shifted

  • dpi – The dpi setting to use for this figure

  • **kwargs – Extra keyword arguments are forwarded to matplotlib.pyplot.subplots()

Returns:

A pair of the created Figure and an 2d ndarray of Axes.