def __init__(self, data, vmin, vmax, cmap, center, robust, annot, fmt,
                 annot_kws, cbar, cbar_kws,
                 xticklabels=True, yticklabels=True, mask=None):
        """Initialize the plotting object."""
        # We always want to have a DataFrame with semantic information
        # and an ndarray to pass to matplotlib
        if isinstance(data, pd.DataFrame):
            plot_data = data.values
        else:
            plot_data = np.asarray(data)
            data = pd.DataFrame(plot_data)

        # Validate the mask and convet to DataFrame
        mask = _matrix_mask(data, mask)

        # Reverse the rows so the plot looks like the matrix
        plot_data = plot_data[::-1]
        data = data.iloc[::-1]
        mask = mask.iloc[::-1]

        plot_data = np.ma.masked_where(np.asarray(mask), plot_data)

        # Get good names for the rows and columns
        xtickevery = 1
        if isinstance(xticklabels, int) and xticklabels > 1:
            xtickevery = xticklabels
            xticklabels = _index_to_ticklabels(data.columns)
        elif xticklabels is True:
            xticklabels = _index_to_ticklabels(data.columns)
        elif xticklabels is False:
            xticklabels = []

        ytickevery = 1
        if isinstance(yticklabels, int) and yticklabels > 1:
            ytickevery = yticklabels
            yticklabels = _index_to_ticklabels(data.index)
        elif yticklabels is True:
            yticklabels = _index_to_ticklabels(data.index)
        elif yticklabels is False:
            yticklabels = []
        else:
            yticklabels = yticklabels[::-1]

        # Get the positions and used label for the ticks
        nx, ny = data.T.shape

        if xticklabels == []:
            self.xticks = []
            self.xticklabels = []
        else:
            xstart, xend, xstep = 0, nx, xtickevery
            self.xticks = np.arange(xstart, xend, xstep) + .5
            self.xticklabels = xticklabels[xstart:xend:xstep]

        if yticklabels == []:
            self.yticks = []
            self.yticklabels = []
        else:
            ystart, yend, ystep = (ny - 1) % ytickevery, ny, ytickevery
            self.yticks = np.arange(ystart, yend, ystep) + .5
            self.yticklabels = yticklabels[ystart:yend:ystep]

        # Get good names for the axis labels
        xlabel = _index_to_label(data.columns)
        ylabel = _index_to_label(data.index)
        self.xlabel = xlabel if xlabel is not None else ""
        self.ylabel = ylabel if ylabel is not None else ""

        # Determine good default values for the colormapping
        self._determine_cmap_params(plot_data, vmin, vmax,
                                    cmap, center, robust)

        # Sort out the annotations
        if annot is None:
            annot = False
            annot_data = None
        elif isinstance(annot, bool):
            if annot:
                annot_data = plot_data
            else:
                annot_data = None
        else:
            try:
                annot_data = annot.values[::-1]
            except __HOLE__:
                annot_data = annot[::-1]
            if annot.shape != plot_data.shape:
                raise ValueError('Data supplied to "annot" must be the same '
                                 'shape as the data to plot.')
            annot = True

        # Save other attributes to the object
        self.data = data
        self.plot_data = plot_data

        self.annot = annot
        self.annot_data = annot_data

        self.fmt = fmt
        self.annot_kws = {} if annot_kws is None else annot_kws
        self.cbar = cbar
        self.cbar_kws = {} if cbar_kws is None else cbar_kws
        self.cbar_kws.setdefault('ticks', mpl.ticker.MaxNLocator(6))
dataset/ETHPy150Open mwaskom/seaborn/seaborn/matrix.py/_HeatMapper.__init__