class_docstr: A cell is a Rectangle with some associated text.
class_docstr_tok: ["A","cell","is","a","Rectangle","with","some","associated","text","."]
docstr: Set text up so it draws in the right place.
  
  Currently support 'left', 'center' and 'right'
code: def _set_text_position(self, renderer):
      """Set text up so it draws in the right place.
  
      Currently support 'left', 'center' and 'right'
      """
      bbox = self.get_window_extent(renderer)
      l, b, w, h = bbox.bounds
  
      # draw in center vertically
      self._text.set_verticalalignment("center")
      y = b + (h / 2.0)
  
      # now position horizontally
      if self._loc == "center":
          self._text.set_horizontalalignment("center")
          x = l + (w / 2.0)
      elif self._loc == "left":
          self._text.set_horizontalalignment("left")
          x = l + (w * self.PAD)
      else:
          self._text.set_horizontalalignment("right")
          x = l + (w * (1.0 - self.PAD))
  
      self._text.set_position((x, y))
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from six.moves import xrange
  import warnings
  from .None import artist
  from .artist import Artist, allow_rasterization
  from .patches import Rectangle
  from matplotlib import docstring
  from .text import Text
  from .transforms import Bbox
  from matplotlib.path import Path
label_desc: Use image node_id 9 for calling the Cell obj's underlying member method code with example usage: obj._set_text_position(renderer) without return types