ENH: Add bw_method and ind kwargs to kind='kde' plot method · Issue #4298 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@khgitting

Description

@khgitting

It'd be really cool when plotting kde's to be able to set the bandwidth used for the kde and the indices at which it is evaluated. This is done with the bw_method kwarg for scipy.stats.gaussian_kde for scipy >= 0.11, a couple years old now, for the former; a variable ind is created in the pandas class KdePlot's _make_plot method and passed to gkde.evaluate.

Here's a patch which implements this functionality: khgitting/pandas@master...kde_kwargs

I'm having trouble passing the Travis CI tests here: https://travis-ci.org/khgitting/pandas/jobs/9284591

It appears the tests use an older version of scipy where gaussian_kde does not take bw_method kwarg. I'd love to be able to resolve this, but am not sure what the right course of action is. Any advice?