matplotlib.gridspec.GridSpec  
class matplotlib.gridspec.GridSpec(nrows, ncols, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None, width_ratios=None, height_ratios=None)  
A class that specifies the geometry of the grid that a subplot will be placed. The location of grid is determined by similar way as the SubplotParams. The number of rows and number of columns of the grid need to be set. Optionally, the subplot layout parameters (e.g., left, right, etc.) can be tuned.  
get_subplot_params(fig=None)  
return a dictionary of subplot layout parameters. The default parameters are from rcParams unless a figure attribute is set. 
  
locally_modified_subplot_params() 
  
tight_layout(fig, renderer=None, pad=1.08, h_pad=None, w_pad=None, rect=None)  
Adjust subplot parameters to give specified padding.    
Parameters:

pad : float Padding between the figure edge and the edges of subplots, as a fraction of the font-size. h_pad, w_pad : float, optional Padding (height/width) between edges of adjacent subplots. Defaults to pad_inches. rect : tuple of 4 floats, optional (left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Default is (0, 0, 1, 1).    
  
update(**kwargs)  
Update the current values. If any kwarg is None, default to the current value, if set, otherwise to rc. 
 
 Examples using matplotlib.gridspec.GridSpec
 
  Demo Tight Layout  

  Markevery Demo  

  Streamplot  

  Pie Demo2  

  Demo Gridspec05  

  Demo Gridspec02  

  Demo Gridspec03  

  Demo Gridspec04  

  Demo Gridspec06  

  Customizing Location of Subplot Using GridSpec  

  Tight Layout guide  


    
{'path': 'public/docs/matplotlib~2.1/_as_gen/matplotlib.gridspec.gridspec.html', 'source': 'DevDocs.IO'}