mwaskom/seaborn — pull request #130 by mwaskom (2014-03-08 22:00:11+00:00)
Title: WIP: MarginGrid and jointplot

This brings back the functionality of `regplot` in version 0.2, but in a much more flexible way.

Two new objects: `MarginGrid` and `jointplot`. (Currently, `MarginGrid` is implemented).

`MarginGrid` is a high-level class to abstract plotting a bivariate and univariate marginal plots. Here's a basic example:

``` python
g = MarginGrid("x", "y", data)
g.plot_marginals(sns.distplot)
g.plot_joint(sns.regplot)
g.annotate(stats.pearsonr)
```
![margingrid](https://f.cloud.github.com/assets/315810/2366530/6b664366-a70c-11e3-9f78-2b0cad8d29d4.png)

The work on this is mostly done (but feedback would be good).

Now comes time to decide how `jointplot` should work. The basic signature would look like:

``` python
sns.jointplot("x", "y", data)
```

- What's the default bivariate plot? `plt.scatter`? `seaborn.regplot`, `seaborn.kdeplot`?
- How do we let the user change the bivariate plot? Pass a plotting function?

``` python
sns.jointplot("x", "y", data, kind=sns.regplot)
```

Or a string key?

``` python
sns.jointplot("x", "y", data, kind="regression")
```

The former is more flexible, but quite overlapping with using `MarginGrid` directly. The latter makes it easier to specify a few limited choices, and point the user at `MarginGrid` if they want more flexibility. I'm leaning towards the latter.

cc: @twiecki