class_docstr: A grid of Axes.
  
  In Matplotlib, the Axes location (and size) is specified in normalized
  figure coordinates. This may not be ideal for images that needs to be
  displayed with a given aspect ratio; for example, it is difficult to
  display multiple images of a same size with some fixed padding between
  them.  AxesGrid can be used in such case.
docstr: Define which axes have tick labels.
  
  Parameters
  ----------
  mode : {"L", "1", "all", "keep"}
      The label mode:
  
      - "L": All axes on the left column get vertical tick labels;
        all axes on the bottom row get horizontal tick labels.
      - "1": Only the bottom left axes is labelled.
      - "all": All axes are labelled.
      - "keep": Do not do anything.
docstr_tok: ["Define","which","axes","have","tick","labels",".","Parameters","--","--","--","--","--","mode",":","{","``","L","''",",","``","1","''",",","``","all","''",",","``","keep","''","}","The","label","mode",":","-","``","L","''",":","All","axes","on","the","left","column","get","vertical","tick","labels",";","all","axes","on","the","bottom","row","get","horizontal","tick","labels",".","-","``","1","''",":","Only","the","bottom","left","axes","is","labelled",".","-","``","all","''",":","All","axes","are","labelled",".","-","``","keep","''",":","Do","not","do","anything","."]
code: def set_label_mode(self, mode):
      """
      Define which axes have tick labels.
  
      Parameters
      ----------
      mode : {"L", "1", "all", "keep"}
          The label mode:
  
          - "L": All axes on the left column get vertical tick labels;
            all axes on the bottom row get horizontal tick labels.
          - "1": Only the bottom left axes is labelled.
          - "all": All axes are labelled.
          - "keep": Do not do anything.
      """
      is_last_row, is_first_col = np.mgrid[
          : self._nrows, : self._ncols
      ] == [[[self._nrows - 1]], [[0]]]
      if mode == "all":
          bottom = left = np.full((self._nrows, self._ncols), True)
      elif mode == "L":
          bottom = is_last_row
          left = is_first_col
      elif mode == "1":
          bottom = left = is_last_row & is_first_col
      else:
          # Use _api.check_in_list at the top of the method when deprecation
          # period expires
          if mode != "keep":
              _api.warn_deprecated(
                  "3.7",
                  name="Grid label_mode",
                  message="Passing an undefined label_mode is deprecated "
                  "since %(since)s and will become an error "
                  "%(removal)s. To silence this warning, pass "
                  '"keep", which gives the same behaviour.',
              )
          return
      for i in range(self._nrows):
          for j in range(self._ncols):
              ax = self.axes_row[i][j]
              if isinstance(ax.axis, MethodType):
                  bottom_axis = SimpleAxisArtist(
                      ax.xaxis, 1, ax.spines["bottom"]
                  )
                  left_axis = SimpleAxisArtist(
                      ax.yaxis, 1, ax.spines["left"]
                  )
              else:
                  bottom_axis = ax.axis["bottom"]
                  left_axis = ax.axis["left"]
              bottom_axis.toggle(
                  ticklabels=bottom[i, j], label=bottom[i, j]
              )
              left_axis.toggle(ticklabels=left[i, j], label=left[i, j])
  
imports: from numbers import Number
  import functools
  from types import MethodType
  import numpy
  from matplotlib import _api, cbook
  from matplotlib.gridspec import SubplotSpec
  from .axes_divider import Size, SubplotDivider, Divider
  from .mpl_axes import Axes, SimpleAxisArtist
label_desc: Use image node_id 11 for calling the Grid obj's underlying member method code with example usage: obj.set_label_mode(mode) without return types