class_docstr: Specifies the location of the subplot in the given `GridSpec`.
      
class_docstr_tok: ["Specifies","the","location","of","the","subplot","in","the","given","`","GridSpec","`","."]
docstr: Update the subplot position from ``figure.subplotpars``.
          
docstr_tok: ["Update","the","subplot","position","from","``","figure.subplotpars","``","."]
code: def get_position(self, figure, return_all=False):
      """Update the subplot position from ``figure.subplotpars``."""
      gridspec = self.get_gridspec()
      nrows, ncols = gridspec.get_geometry()
      rows, cols = np.unravel_index(
          [self.num1] if self.num2 is None else [self.num1, self.num2],
          (nrows, ncols),
      )
      (
          fig_bottoms,
          fig_tops,
          fig_lefts,
          fig_rights,
      ) = gridspec.get_grid_positions(figure)
  
      fig_bottom = fig_bottoms[rows].min()
      fig_top = fig_tops[rows].max()
      fig_left = fig_lefts[cols].min()
      fig_right = fig_rights[cols].max()
      figbox = Bbox.from_extents(
          fig_left, fig_bottom, fig_right, fig_top
      )
  
      if return_all:
          return figbox, rows[0], cols[0], nrows, ncols
      else:
          return figbox
  
imports: from __future__ import absolute_import, division, print_function
  import six
  import copy
  import logging
  import warnings
  import numpy
  import matplotlib
  from matplotlib import _pylab_helpers, tight_layout, rcParams
  from matplotlib.transforms import Bbox
  import matplotlib._layoutbox
  from matplotlib.cbook import mplDeprecation
label_desc: Use image node_id 7 for calling the SubplotSpec obj's underlying member method code with example usage: obj.get_position(figure, return_all) and returns: figbox,  rows,  cols,  nrows,  ncols, figbox