class_docstr: Draw a heatmap plot of a matrix with nice labels and colormaps.
class_docstr_tok: ["Draw","a","heatmap","plot","of","a","matrix","with","nice","labels","and","colormaps","."]
docstr: Determine ticks and ticklabels that minimize overlap.
docstr_tok: ["Determine","ticks","and","ticklabels","that","minimize","overlap","."]
code: def _auto_ticks(self, ax, labels, axis):
      """Determine ticks and ticklabels that minimize overlap."""
      transform = ax.figure.dpi_scale_trans.inverted()
      bbox = ax.get_window_extent().transformed(transform)
      size = [bbox.width, bbox.height][axis]
      axis = [ax.xaxis, ax.yaxis][axis]
      (tick,) = axis.set_ticks([0])
      fontsize = tick.label1.get_size()
      max_ticks = int(size // (fontsize / 72))
      if max_ticks < 1:
          return [], []
      tick_every = len(labels) // max_ticks + 1
      tick_every = 1 if tick_every == 0 else tick_every
      ticks, labels = self._skip_ticks(labels, tick_every)
      return ticks, labels
  
imports: import warnings
  import matplotlib
  from matplotlib.collections import LineCollection
  import matplotlib.pyplot
  from matplotlib import gridspec
  import numpy
  import pandas
  from .None import cm
  from .axisgrid import Grid
  from ._compat import get_colormap
  from .utils import despine, axis_ticklabels_overlap, relative_luminance, to_utf8, _draw_figure
label_desc: Use image node_id 5 for calling the _HeatMapper obj's underlying member method code with example usage: obj._auto_ticks(ax, labels, axis) and returns: ticks,  labels, list,  list