def hist(<EOL>self,<EOL>x=None,<EOL>y=None,<EOL>by=None,<EOL>bins=<NUM_LIT:10>,<EOL>stacked=False,<EOL>alpha=None,<EOL>histtype="<STR_LIT:bar>",<EOL>var_name="<STR_LIT>",<EOL>value_name="<STR_LIT:value>",<EOL>width=<NUM_LIT>,<EOL>height=<NUM_LIT>,<EOL>ax=None,<EOL>**kwds<EOL>):
if by is not None:<EOL><INDENT>raise NotImplementedError("<STR_LIT>")<EOL><DEDENT>if x is not None or y is not None:<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>df = self._data.melt(var_name=var_name, value_name=value_name)<EOL>marks = {<EOL>"<STR_LIT:bar>": "<STR_LIT:bar>",<EOL>"<STR_LIT>": "<STR_LIT:bar>",<EOL>"<STR_LIT>": {"<STR_LIT:type>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"},<EOL>"<STR_LIT>": {"<STR_LIT:type>": "<STR_LIT>", "<STR_LIT>": "<STR_LIT>"},<EOL>}<EOL>if histtype in marks:<EOL><INDENT>mark = marks[histtype]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" "<STR_LIT>".format(histtype))<EOL><DEDENT>if alpha is None and not stacked and df[var_name].nunique() > <NUM_LIT:1>:<EOL><INDENT>alpha = <NUM_LIT><EOL><DEDENT>chart = self._plot(<EOL>data=df,<EOL>width=width,<EOL>height=height,<EOL>title=kwds.pop("<STR_LIT:title>", "<STR_LIT>"),<EOL>figsize=kwds.pop("<STR_LIT>", None),<EOL>dpi=kwds.pop("<STR_LIT>", None),<EOL>)<EOL>chart.mark = mark<EOL>chart = chart.encode(<EOL>x=alt.X(value_name, bin={"<STR_LIT>": bins}, type="<STR_LIT>"),<EOL>y=alt.Y(<EOL>aggregate="<STR_LIT:count>",<EOL>type="<STR_LIT>",<EOL>stack=("<STR_LIT>" if stacked else None),<EOL>),<EOL>color=alt.Color(field=var_name, type="<STR_LIT>"),<EOL>)<EOL>if alpha is not None:<EOL><INDENT>assert <NUM_LIT:0> <= alpha <= <NUM_LIT:1><EOL>chart = chart.encode(opacity=alt.value(alpha))<EOL><DEDENT>if ax is not None:<EOL><INDENT>return ax + chart<EOL><DEDENT>warn_if_keywords_unused("<STR_LIT>", kwds)<EOL>return chart<EOL>
Histogram plot for DataFrame data

        >>> dataframe.vgplot.hist()  # doctest: +SKIP

        Parameters
        ----------
        x : string, optional
            the column to use as the x-axis variable. If not specified, the
            index will be used.
        y : string, optional
            the column to use as the y-axis variable. If not specified, all
            columns (except x if specified) will be used.
        by : string, optional
            the column by which to group the results
        bins : integer, optional
            the maximum number of bins to use for the histogram (default: 10)
        stacked : bool, optional
            if True (default) then create a stacked area chart. Otherwise,
            areas will overlap
        alpha : float, optional
            transparency level, 0 <= alpha <= 1
        histtype : string, {'bar', 'step', 'stepfilled'}
            The type of histogram to generate. Default is 'bar'.
        var_name : string, optional
            the legend title
        value_name : string, optional
            the y-axis label
        width : int, optional
            the width of the plot in pixels
        height : int, optional
            the height of the plot in pixels
        ax: altair.Chart, optional
            chart to be overlayed with this vis (convinience method for `chart1 + chart2`)

        Returns
        -------
        chart : alt.Chart
            altair chart representation