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: Heatmap plot for DataFrame data
  
  Note that Vega-Lite does not support hexagonal binning, so this method
  returns a cartesian heatmap.
  
  >>> dataframe.vgplot.hexbin()  # doctest: +SKIP
  
  Parameters
  ----------
  x : string
      the column to use as the x-axis variable.
  y : string
      the column to use as the y-axis variable.
  C : string, optional
      the column to use to compute the mean within each bin. If not
      specified, the count within each bin will be used.
  reduce_C_function : string, default = 'mean'
      One of ['mean', 'sum', 'median', 'min', 'max', 'count'], or
      associated numpy or python builtin functions. Note that arbitrary
      callable functions are not supported.
  gridsize : int, optional
      the number of divisions in the x and y axis (default=100)
  alpha : float, optional
      transparency level, 0 <= alpha <= 1
  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: ["Heatmap","plot","for","DataFrame","data","Note","that","Vega-Lite","does","not","support","hexagonal","binning",",","so","this","method","returns","a","cartesian","heatmap",".",">",">",">","dataframe.vgplot.hexbin","(",")","#","doctest",":","+SKIP","Parameters","--","--","--","--","--","x",":","string","the","column","to","use","as","the","x-axis","variable",".","y",":","string","the","column","to","use","as","the","y-axis","variable",".","C",":","string",",","optional","the","column","to","use","to","compute","the","mean","within","each","bin",".","If","not","specified",",","the","count","within","each","bin","will","be","used",".","reduce_C_function",":","string",",","default","=","'mean'","One","of","[","'mean","'",",","'sum","'",",","'median","'",",","'min","'",",","'max","'",",","'count","'","]",",","or","associated","numpy","or","python","builtin","functions",".","Note","that","arbitrary","callable","functions","are","not","supported",".","gridsize",":","int",",","optional","the","number","of","divisions","in","the","x","and","y","axis","(","default=100",")","alpha",":","float",",","optional","transparency","level",",","0","<","=","alpha","<","=","1","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 heatmap(
      self,
      x,
      y,
      C=None,
      reduce_C_function="mean",
      gridsize=100,
      alpha=None,
      width=450,
      height=300,
      ax=None,
      **kwds,
  ):
      """Heatmap plot for DataFrame data
  
      Note that Vega-Lite does not support hexagonal binning, so this method
      returns a cartesian heatmap.
  
      >>> dataframe.vgplot.hexbin()  # doctest: +SKIP
  
      Parameters
      ----------
      x : string
          the column to use as the x-axis variable.
      y : string
          the column to use as the y-axis variable.
      C : string, optional
          the column to use to compute the mean within each bin. If not
          specified, the count within each bin will be used.
      reduce_C_function : string, default = 'mean'
          One of ['mean', 'sum', 'median', 'min', 'max', 'count'], or
          associated numpy or python builtin functions. Note that arbitrary
          callable functions are not supported.
      gridsize : int, optional
          the number of divisions in the x and y axis (default=100)
      alpha : float, optional
          transparency level, 0 <= alpha <= 1
      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
      """
      # TODO: Use actual hexbins rather than a grid heatmap
      reduce_C_function = validate_aggregation(reduce_C_function)
  
      if C is None:
          df = self._data[[x, y]]
      else:
          df = self._data[[x, y, C]]
  
      if C is None:
          color = alt.Color(aggregate="count", type="quantitative")
      else:
          color = alt.Color(
              field=C, aggregate=reduce_C_function, type="quantitative"
          )
  
      color.scale = alt.Scale(scheme="greens")
  
      chart = (
          self._plot(
              data=df,
              width=width,
              height=height,
              title=kwds.pop("title", ""),
              figsize=kwds.pop("figsize", None),
              dpi=kwds.pop("dpi", None),
          )
          .mark_rect()
          .encode(
              x=alt.X(
                  x, bin=alt.Bin(maxbins=gridsize), type="quantitative"
              ),
              y=alt.Y(
                  y, bin=alt.Bin(maxbins=gridsize), type="quantitative"
              ),
              color=color,
          )
      )
  
      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("hexbin", 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 8 for calling the FramePlotMethods obj's underlying member method code with example usage: obj.heatmap(x, y, C, reduce_C_function, gridsize, alpha, width, height, ax) and returns: chart, unknown