code: def plot_anat(
      anat=None,
      anat_affine=None,
      cut_coords=None,
      slicer="ortho",
      figure=None,
      axes=None,
      title=None,
      annotate=True,
      draw_cross=True,
      black_bg=False,
      dim=False,
      cmap=plt.cm.gray,
      **imshow_kwargs,
  ):
      """Plot three cuts of an anatomical image (Frontal, Axial, and Lateral)
  
      Parameters
      ----------
      anat : 3D ndarray, optional
          The anatomical image to be used as a background. If None is
          given, nipy tries to find a T1 template.
      anat_affine : 4x4 ndarray, optional
          The affine matrix going from the anatomical image voxel space to
          MNI space. This parameter is not used when the default
          anatomical is used, but it is compulsory when using an
          explicit anatomical image.
      figure : integer or matplotlib figure, optional
          Matplotlib figure used or its number. If None is given, a
          new figure is created.
      cut_coords: None, or a tuple of floats
          The MNI coordinates of the point where the cut is performed, in
          MNI coordinates and order.
          If slicer is 'ortho', this should be a 3-tuple: (x, y, z)
          For slicer == 'x', 'y', or 'z', then these are the
          coordinates of each cut in the corresponding direction.
          If None is given, the cuts is calculated automatically.
      slicer: {'ortho', 'x', 'y', 'z'}
          Choose the direction of the cuts. With 'ortho' three cuts are
          performed in orthogonal directions
      figure : integer or matplotlib figure, optional
          Matplotlib figure used or its number. If None is given, a
          new figure is created.
      axes : matplotlib axes or 4 tuple of float: (xmin, ymin, width, height), optional
          The axes, or the coordinates, in matplotlib figure space,
          of the axes used to display the plot. If None, the complete
          figure is used.
      title : string, optional
          The title displayed on the figure.
      annotate: boolean, optional
          If annotate is True, positions and left/right annotation
          are added to the plot.
      draw_cross: boolean, optional
          If draw_cross is True, a cross is drawn on the plot to
          indicate the cut plosition.
      black_bg: boolean, optional
          If True, the background of the image is set to be black. If
          you wish to save figures with a black background, you
          will need to pass "facecolor='k', edgecolor='k'" to pyplot's
          savefig.
      dim: float, optional
          If set, dim the anatomical image, such that
          vmax = vmean + (1+dim)*ptp if black_bg is set to True, or
          vmin = vmean - (1+dim)*ptp otherwise, where
          ptp = .5*(vmax - vmin)
      cmap: matplotlib colormap, optional
          The colormap for the anat
      imshow_kwargs: extra keyword arguments, optional
          Extra keyword arguments passed to pyplot.imshow
  
      Notes
      -----
      Arrays should be passed in numpy convention: (x, y, z)
      ordered.
      """
      slicer = SLICERS[slicer].init_with_figure(
          data=anat,
          affine=anat_affine,
          threshold=0,
          cut_coords=cut_coords,
          figure=figure,
          axes=axes,
          black_bg=black_bg,
      )
  
      _plot_anat(
          slicer,
          anat,
          anat_affine,
          title=title,
          annotate=annotate,
          draw_cross=draw_cross,
          dim=dim,
          cmap=cmap,
          **imshow_kwargs,
      )
      return slicer
  
file_path: nipy/nipy/labs/viz_tools/activation_maps.py
imports: import numbers
  import warnings
  import matplotlib.pyplot
  import numpy
  from nipy.utils import is_numlike
  from .anat_cache import _AnatCache, mni_sform, mni_sform_inv
  from .coord_tools import coord_transform, find_maxsep_cut_coords
  from .edge_detect import _fast_abs_percentile
  from .slicers import SLICERS, _xyz_order
label_desc: Use image node_id 3 for calling a global function with example usage: plot_anat(anat, anat_affine, cut_coords, slicer, figure, axes, title, annotate, draw_cross, black_bg, dim, cmap) and returns: slicer