class_docstr: Divider based on the preexisting axes.
class_docstr_tok: ["Divider","based","on","the","preexisting","axes","."]
docstr: Helper method for ``append_axes("left")`` and ``append_axes("right")``.
  
  See the documentation of `append_axes` for more details.
  
  :meta private:
docstr_tok: ["Helper","method","for","``","append_axes","(","``","left","''",")","``","and","``","append_axes","(","``","right","''",")","``",".","See","the","documentation","of","`","append_axes","`","for","more","details",".",":","meta","private",":"]
code: def new_horizontal(self, size, pad=None, pack_start=False, **kwargs):
      """
      Helper method for ``append_axes("left")`` and ``append_axes("right")``.
  
      See the documentation of `append_axes` for more details.
  
      :meta private:
      """
      if pad is None:
          pad = mpl.rcParams["figure.subplot.wspace"] * self._xref
      pos = "left" if pack_start else "right"
      if pad:
          if not isinstance(pad, Size._Base):
              pad = Size.from_any(pad, fraction_ref=self._xref)
          self.append_size(pos, pad)
      if not isinstance(size, Size._Base):
          size = Size.from_any(size, fraction_ref=self._xref)
      self.append_size(pos, size)
      locator = self.new_locator(
          nx=0 if pack_start else len(self._horizontal) - 1,
          ny=self._yrefindex,
      )
      ax = self._get_new_axes(**kwargs)
      ax.set_axes_locator(locator)
      return ax
  
imports: import functools
  import numpy
  import matplotlib
  from matplotlib import _api
  from matplotlib.gridspec import SubplotSpec
  import matplotlib.transforms
  from .None import axes_size
label_desc: Use image node_id 3 for calling the AxesDivider obj's underlying member method code with example usage: obj.new_horizontal(size, pad, pack_start) and returns: ax