GridSpec.update¶
- GridSpec.update(**kwargs)[source]¶
Update the gridspec with arbitrary initialization keyword arguments and update the subplot positions.
- Parameters
left, right, top, bottom (
float
orstr
, optional) – The fixed space between the subplots and the figure edge. Default isNone
. If float, units are em-widths. If string, interpreted byunits
. IfNone
, the space is determined automatically based on the font size and axis sharing settings. Ifrc['subplots.tight']
isTrue
, the space is determined by the tight layout algorithm.wspace, hspace, space (
float
orstr
orlist thereof
, optional) – The fixed space between grid columns, rows, and both, respectively. If float, string, orNone
, this value is expanded into lists of lengthncols - 1
(forwspace
) or lengthnrows - 1
(forhspace
). If list, the list must match these lengths. Default isNone
. If float, units are em-widths. If string, interpreted byunits
.For list elements equal to
None
, the space is determined automatically based on the font size and axis settings. Ifrc['subplots.tight']
isTrue
, the space is determined by the tight layout algorithm. Otherwise, a sensible default value is chosen. For example,subplots(ncols=3, tight=True, wspace=(2, None))
fixes the space between columns 1 and 2 but lets the tight layout algorithm determine the space between columns 2 and 3.wratios, hratios (
float
orlist thereof
, optional) – Passed toGridSpec
, denotes the width and height ratios for the subplot grid. Length ofwratios
must match the number of rows, and length ofhratios
must match the number of columns.width_ratios, height_ratios – Aliases for
wratios
,hratios
. Included for consistency with thematplotlib.pyplot.subplots
command.wpad, hpad, pad (
float
orstr
orlist thereof
, optional) – The tight layout padding between columns, rows, and both, respectively. Unlikespace
, these control the padding between subplot content (including text, ticks, etc.) rather than subplot edges. As withspace
, these can be scalars or arrays optionally containingNone
. Default isinnerpad
. If float, units are em-widths. If string, interpreted byunits
.