class_docstr: The main purpose of these class is to have auto adjust of axes size
  to the data with different layout of cuts.
class_docstr_tok: ["The","main","purpose","of","these","class","is","to","have","auto","adjust","of","axes","size","to","the","data","with","different","layout","of","cuts","."]
docstr: Add annotations to the plot.
  
  Parameters
  ----------
  left_right: boolean, optional
      If left_right is True, annotations indicating which side
      is left and which side is right are drawn.
  positions: boolean, optional
      If positions is True, annotations indicating the
      positions of the cuts are drawn.
  size: integer, optional
      The size of the text used.
  kwargs:
      Extra keyword arguments are passed to matplotlib's text
      function.
docstr_tok: ["Add","annotations","to","the","plot",".","Parameters","--","--","--","--","--","left_right",":","boolean",",","optional","If","left_right","is","True",",","annotations","indicating","which","side","is","left","and","which","side","is","right","are","drawn",".","positions",":","boolean",",","optional","If","positions","is","True",",","annotations","indicating","the","positions","of","the","cuts","are","drawn",".","size",":","integer",",","optional","The","size","of","the","text","used",".","kwargs",":","Extra","keyword","arguments","are","passed","to","matplotlib","'s","text","function","."]
code: def annotate(
      self, left_right=True, positions=True, size=12, **kwargs
  ):
      """Add annotations to the plot.
  
      Parameters
      ----------
      left_right: boolean, optional
          If left_right is True, annotations indicating which side
          is left and which side is right are drawn.
      positions: boolean, optional
          If positions is True, annotations indicating the
          positions of the cuts are drawn.
      size: integer, optional
          The size of the text used.
      kwargs:
          Extra keyword arguments are passed to matplotlib's text
          function.
      """
      kwargs = kwargs.copy()
      if "color" not in kwargs:
          if self._black_bg:
              kwargs["color"] = "w"
          else:
              kwargs["color"] = "k"
  
      bg_color = "k" if self._black_bg else "w"
      if left_right:
          for cut_ax in self.axes.values():
              cut_ax.draw_left_right(
                  size=size, bg_color=bg_color, **kwargs
              )
  
      if positions:
          for cut_ax in self.axes.values():
              cut_ax.draw_position(
                  size=size, bg_color=bg_color, **kwargs
              )
  
imports: import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import transforms
  from nipy.utils import is_iterable
  from ..datasets import VolumeImg
  from .None import cm
  from .coord_tools import coord_transform, find_cut_coords, get_bounds, get_mask_bounds
  from .edge_detect import _edge_map
label_desc: Use image node_id 9 for calling the BaseSlicer obj's underlying member method code with example usage: obj.annotate(left_right, positions, size) without return types