Composition: panes

panes(x, y, f=None, fig=None, shape=None, figsize=None, show=False, rows=1, top=None, bottom=None, left=None, right=None, wspace=None, hspace=None, **kwargs)

The table below displays the supported numerical input combinations, where:

  • array: List or NumPy array with numerical values

  • […]: List containing …

  • result: <curves>

Table 2 Valid input combinations.

x

y

Result

Notes

array

array

11

array

[array, array]

12

Both y share x

[n*[array]]

[n*[array]]

1n

Each y has an x

array

[array, array]

21

Both y share x

[array, array]

[array, array]

21

Each y has an x

array

[n*[array], n*[array]]

2n

All curves in all (2) panes share a single x

[array, array]

[n*[array], n*[array]]

2n

All curves in each pane share an x

[n*[array], n*[array]]

[n*[array], n*[array]]

2n

All curves in all (2) panes have their own x

[n*[array], … up to m]

[n*[array], … up to m]

mn

All curves in all panes have their own x

Arguments are internally classified as figure, legend, plural and curve arguments, namely:

  • Figure arguments

    Arguments which may be input only once in the plotting process, so as to avoid conflicts (eg: passing grid=True twice (plt.grid(...)) will result in no grid being drawn). These are removed from the keyword arguments and applied in the last comparison call.

  • Legend arguments

    These are plot_label/s, which to avoid redundancy are applied in the last comparison. This is done only if the number of curves is the same across all panes, and equal to the number of provided plot_labels.

  • Plural arguments

    Arguments passed with any of the keywords accepted by all 2D plotters -that is, any keyword which does not start with the name of its plotting class-, in plural tense. These must be lists of length equal to the number of panes. Each element in the list is the value of the keyword argument for each pane (eg: tick_labels_x=[1, 2, 3] will set the tick labels of the x axes to 1, 2 and 3 respectively in a 3-pane plot).

  • Curve arguments

    Arguments passed as plurals to the comparison function. These are once more lists containing the value of a keyword argument, passed in plural, for each curve following the convention shown above for data input, such that passing colors=[['red', 'blue'], ['green', 'red']] to a plot containing 2 panes with 2 curves each will color the curves in the first pane red and blue, and those in the second green and red.

Arguments

Parameters
  • x (list of list or list of np.ndarray or np.ndarray) – Data

  • y (list of list or list of np.ndarray or np.ndarray) – Data

  • f (list of function or list of plot) – List of plotting functions to use for each curve

  • fig (matplotlib.figure.Figure) – Figure object on which to plot

  • figsize (tuple of float) – Figure size

  • show (bool) – Whether to plt.show() after plotting (thereby finishing the plot)

  • rows (int) – Number of rows

  • top (float) – plt.subplots_adjust parameter

  • bottom (float) – plt.subplots_adjust parameter

  • left (float) – plt.subplots_adjust parameter

  • right (float) – plt.subplots_adjust parameter

  • wspace (float) – plt.subplots_adjust parameter

  • hspace (float) – plt.subplots_adjust parameter

  • kwargs – MPL Plotter plotting class keyword arguments for further customization

Output

Parameters

panes – list of lists, each containing the objects output by each Matplotlib plotting function used