FooBar
FooBar

Reputation: 16508

Seaborn jointplot: Regression with histogram but without kernel

When using seaborn's joint plot function, setting kind=reg will draw a scatter plot with regression line, an outer histogram and an estimated kernel density (see here).

I would like to get all of that, but not the kernel density estimation. However, it seems that the kind switch either gives me all or nothing. The only conceivable alternative is to use a standard regplot and then manually add the histograms around it.. is there any more convenient way of doing this?

Upvotes: 0

Views: 1403

Answers (1)

ImportanceOfBeingErnest
ImportanceOfBeingErnest

Reputation: 339560

The seaborn jointplot has arguments

{joint, marginal, annot}_kws : dicts, optional
Additional keyword arguments for the plot components.

Since it plots a distplot to the marginal axes, the marginal_kws needs to be used to pass additional keyword arguments to distplot.

The argument to be used to turn the kde off is found in the distplot documentation

kde : bool, optional
Whether to plot a gaussian kernel density estimate.

Upvotes: 2

Related Questions