class_docstr: DataFrame Accessor & Method for creating Vega-Lite visualizations.
  
  Examples
  --------
  >>> df.vgplot.line()  # doctest: +SKIP
  >>> df.vgplot.area()  # doctest: +SKIP
  >>> df.vgplot.bar()  # doctest: +SKIP
  >>> df.vgplot.barh()  # doctest: +SKIP
  >>> df.vgplot.hist()  # doctest: +SKIP
  >>> df.vgplot.kde()  # doctest: +SKIP
  >>> df.vgplot.density()  # doctest: +SKIP
  >>> df.vgplot.scatter(x, y)  # doctest: +SKIP
  >>> df.vgplot.hexbin(x, y)  # doctest: +SKIP
  
  Plotting methods can also be accessed by calling the accessor as a method
  with the ``kind`` argument: ``df.vgplot(kind='line', **kwds)``
  is equivalent to ``df.vgplot.line(**kwds)``
docstr: 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
docstr_tok: ["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"]
code: def hist(
      self,
      x=None,
      y=None,
      by=None,
      bins=10,
      stacked=False,
      alpha=None,
      histtype="bar",
      var_name="variable",
      value_name="value",
      width=450,
      height=300,
      ax=None,
      **kwds,
  ):
      """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
      """
      if by is not None:
          raise NotImplementedError("vgplot.hist `by` keyword")
      if x is not None or y is not None:
          raise NotImplementedError('"x" and "y" args to hist()')
      df = self._data.melt(var_name=var_name, value_name=value_name)
  
      marks = {
          "bar": "bar",
          "barstacked": "bar",
          "stepfilled": {"type": "area", "interpolate": "step"},
          "step": {"type": "line", "interpolate": "step"},
      }
  
      if histtype in marks:
          mark = marks[histtype]
      else:
          raise ValueError(
              "histtype '{0}' is not recognized" "".format(histtype)
          )
  
      if alpha is None and not stacked and df[var_name].nunique() > 1:
          alpha = 0.7
  
      chart = self._plot(
          data=df,
          width=width,
          height=height,
          title=kwds.pop("title", ""),
          figsize=kwds.pop("figsize", None),
          dpi=kwds.pop("dpi", None),
      )
  
      chart.mark = mark
      chart = chart.encode(
          x=alt.X(
              value_name, bin={"maxbins": bins}, type="quantitative"
          ),
          y=alt.Y(
              aggregate="count",
              type="quantitative",
              stack=("zero" if stacked else None),
          ),
          color=alt.Color(field=var_name, type="nominal"),
      )
  
      if alpha is not None:
          assert 0 <= alpha <= 1
          chart = chart.encode(opacity=alt.value(alpha))
  
      if ax is not None:
          return ax + chart
  
      warn_if_keywords_unused("hist", kwds)
      return chart
  
imports: import numpy
  import pandas
  import altair
  from ._utils import infer_vegalite_type, unpivot_frame, warn_if_keywords_unused, validate_aggregation
  from ._pandas_internals import PandasObject, register_dataframe_accessor, register_series_accessor
label_desc: Use image node_id 7 for calling the FramePlotMethods obj's underlying member method code with example usage: obj.hist(x, y, by, bins, stacked, alpha, histtype, var_name, value_name, width, height, ax) and returns: chart, unknown