GridSpec.copy¶
- GridSpec.copy(**kwargs)[source]¶
Return a copy of the
GridSpecwith theFigure-specific “panel slots” removed. This can be useful if you want to draw multiple figures with the same geometry. Properties are inherited from thisGridSpecby default but can be changed by passing keyword arguments.- Parameters
left, right, top, bottom (
unit-spec, default:None) – The fixed space between the subplots and the figure edge. If float, units are em-widths. If string, interpreted byunits. IfNone, the space is determined automatically based on the tick and label settings. Ifrc['subplots.tight']isTrueortight=Truewas passed to the figure, the space is determined by the tight layout algorithm.wspace, hspace, space (
unit-specor sequence, default:None) – 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 a sequence, its length must match these lengths. If float, units are em-widths. If string, interpreted byunits.For elements equal to
None, the space is determined automatically based on the tick and label settings. Ifrc['subplots.tight']isTrueortight=Truewas passed to the figure, the space is determined by the tight layout algorithm. 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 (
floator sequence, optional) – Passed toGridSpec, denotes the width and height ratios for the subplot grid. Length ofwratiosmust match the number of columns, and length ofhratiosmust match the number of rows.width_ratios, height_ratios – Aliases for
wratios,hratios. Included for consistency withmatplotlib.gridspec.GridSpec.wpad, hpad, pad (
unit-specor sequence, 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. For elements equal toNone, the default isinnerpad. If float, units are em-widths. If string, interpreted byunits.wequal, hequal, equal (
bool, default:rc['subplots.equalspace']=False) – Whether to make the tight layout algorithm apply equal spacing between columns, rows, or both.wgroup, hgroup, group (
bool, default:rc['subplots.groupspace']=True) – Whether to make the tight layout algorithm just consider spaces between adjacent subplots instead of entire columns and rows of subplots.outerpad (
unit-spec, default:rc['subplots.outerpad']=0.5) – The scalar tight layout padding around the left, right, top, bottom figure edges. If float, units are em-widths. If string, interpreted byunits.innerpad (
unit-spec, default:rc['subplots.innerpad']=1.0) – The scalar tight layout padding between columns and rows. Synonymous withpad. If float, units are em-widths. If string, interpreted byunits.panelpad (
unit-spec, default:rc['subplots.panelpad']=0.5) – The scalar tight layout padding between subplots and their panels, colorbars, and legends and between “stacks” of these objects. If float, units are em-widths. If string, interpreted byunits.
See also