Skip to content

ENH: Add bw_method and ind kwargs to kind='kde' plot method #4298

Closed
@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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions