faceted.faceted

faceted.faceted(rows, cols, width=None, height=None, aspect=None, top_pad=0.25, bottom_pad=0.25, left_pad=0.25, right_pad=0.25, internal_pad=0.33, cbar_mode=None, cbar_short_side_pad=0.0, cbar_pad=0.5, cbar_size=0.125, cbar_location='right', sharex='all', sharey='all', axes_kwargs=None)

Create figure and tiled axes objects with precise attributes.

In general exactly two of width, height, and aspect should be defined. However, if none or one of them are defined then reasonable defaults are selected:

  • If none are provided the width is assumed to be 8.0 inches and the aspect is assumed to be 0.618.

  • If only a width is provided, the aspect is assumed to be 0.618.

  • If only a height is provided, the aspect is assumed to be 0.618.

  • If only an aspect is provided, the width is assumed to be 8.0 inches.

Parameters
rowsint

Number of rows of tiles in figure

colsint

Number of columns of tiles in figure

widthfloat

Width of figure

heightfloat

Height of figure

aspectfloat

Aspect ratio of plots in each tile

top_padfloat

Spacing (in inches) between top of figure and axes

bottom_padfloat

Spacing (in inches) between bottom of figure and axes

left_padfloat

Spacing (in inches) between left of figure and axes

right_padfloat

Spacing (in inches) between right of figure and axes

internal_padfloat or tuple

Spacing in between panels in both the horizontal and vertical directions (in inches); if an individual number, the spacing is the same in the horizontal and vertical; if a tuple is specified, the left value is the horizontal pad, and the right value is the vertical pad.

cbar_mode{None, ‘single’, ‘edge’, ‘each’}

Mode for adding colorbar(s) to figure

cbar_short_side_padfloat

Spacing between the ends of the colorbar and the edges of the axes (in inches); controls the length of the colorbar

cbar_padfloat

Spacing between plot axes and the colorbar axes (in inches)

cbar_sizefloat

Width of the colorbar in inches

cbar_location{‘top’, ‘bottom’, ‘left’, ‘right’}

Side of the plot axes (or figure) for the colorbar

sharexbool or {‘all’, ‘col’, ‘row’, ‘none’}

Share x-axis limits, ticks, and tick labels

shareybool or {‘all’, ‘col’, ‘row’, ‘none’}

Share y-axis limits, ticks, and tick labels

axes_kwargsdict

Keyword arguments to pass to Axes constructor

Returns
fig, axes, caxes (if caxes requested)