The fit method is the primary drawing input for the frequency
        distribution visualization. It requires vectorized lists of
        documents and a list of features, which are the actual words
        from the original corpus (needed to label the x-axis ticks).

        Parameters
        ----------
        X : ndarray or DataFrame of shape n x m
            A matrix of n instances with m features representing the corpus
            of frequency vectorized documents.

        y : ndarray or DataFrame of shape n
            Labels for the documents for conditional frequency distribution.

        .. note:: Text documents must be vectorized before ``fit()``.

def fit(self, X, y=None):
        """
        The fit method is the primary drawing input for the frequency
        distribution visualization. It requires vectorized lists of
        documents and a list of features, which are the actual words
        from the original corpus (needed to label the x-axis ticks).

        Parameters
        ----------
        X : ndarray or DataFrame of shape n x m
            A matrix of n instances with m features representing the corpus
            of frequency vectorized documents.

        y : ndarray or DataFrame of shape n
            Labels for the documents for conditional frequency distribution.

        .. note:: Text documents must be vectorized before ``fit()``.
        """

        # Compute the conditional word frequency
        if y is not None:
            # Fit the frequencies
            self.conditional_freqdist_ = {}

            # Conditional frequency distribution
            self.classes_ = [str(label) for label in set(y)]
            for label in self.classes_:
                self.conditional_freqdist_[label] = self.count(X[y == label])
        else:
            # No conditional frequencies
            self.conditional_freqdist_ = None

        # Frequency distribution of entire corpus.
        self.freqdist_ = self.count(X)
        self.sorted_ = self.freqdist_.argsort()[::-1] # Descending order

        # Compute the number of words, vocab, and hapaxes
        self.vocab_ = self.freqdist_.shape[0]
        self.words_ = self.freqdist_.sum()
        self.hapaxes_ = sum(1 for c in self.freqdist_ if c == 1)

        # Draw and ensure that we return self
        self.draw()
        return self