def kde(self, bw_method=None, alpha=None, width=<NUM_LIT>, height=<NUM_LIT>, ax=None, **kwds):
from scipy.stats import gaussian_kde<EOL>data = self._data<EOL>tmin, tmax = data.min(), data.max()<EOL>trange = tmax - tmin<EOL>t = np.linspace(tmin - <NUM_LIT:0.5> * trange, tmax + <NUM_LIT:0.5> * trange, <NUM_LIT:1000>)<EOL>kde_ser = pd.Series(<EOL>gaussian_kde(data, bw_method=bw_method).evaluate(t), index=t, name=data.name<EOL>)<EOL>kde_ser.index.name = "<STR_LIT:U+0020>"<EOL>f = self.__class__(kde_ser)<EOL>return f.line(alpha=alpha, width=width, height=height, ax=ax, **kwds)<EOL>
Kernel Density Estimation plot for Series data

        >>> series.vgplot.kde()  # doctest: +SKIP

        Parameters
        ----------
        bw_method : str, scalar or callable, optional
            The method used to calculate the estimator bandwidth. This can be
            'scott', 'silverman', a scalar constant or a callable.
            See `scipy.stats.gaussian_kde` for more details.
        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