def histogram(self, counts, bin_edges, linestyle='solid'):
        """Plot a histogram.

        The user needs to supply the histogram.  This method only plots
        the results.  You can use NumPy's histogram function.

        :param counts: array containing the count values.
        :param bin_edges: array containing the bin edges.
        :param linestyle: the line style used to connect the data points.
            May be None, or any line style accepted by TikZ (e.g. solid,
            dashed, dotted, thick, or even combinations like
            "red,thick,dashed").

        Example::

            >>> plot = artist.Plot()
            >>> x = np.random.normal(size=1000)
            >>> n, bins = np.histogram(x)
            >>> plot.histogram(n, bins)

        """
        if len(bin_edges) - 1 != len(counts):
            raise RuntimeError(
                'The length of bin_edges should be length of counts + 1')
        x = bin_edges
        y = list(counts) + [counts[-1]]
        self.plot(x, y, mark=None, linestyle=linestyle, use_steps=True)
Plot a histogram.

        The user needs to supply the histogram.  This method only plots
        the results.  You can use NumPy's histogram function.

        :param counts: array containing the count values.
        :param bin_edges: array containing the bin edges.
        :param linestyle: the line style used to connect the data points.
            May be None, or any line style accepted by TikZ (e.g. solid,
            dashed, dotted, thick, or even combinations like
            "red,thick,dashed").

        Example::

            >>> plot = artist.Plot()
            >>> x = np.random.normal(size=1000)
            >>> n, bins = np.histogram(x)
            >>> plot.histogram(n, bins)