ENH: Groupby.plot enhancement by sinhrks · Pull Request #8018 · pandas-dev/pandas (original) (raw)
@sinhrks We haven't quite finished the faceting API for xray, but basically the idea is to copy it from Seaborn. Plot methods accept arguments like row
, col
and col_span
which control which how to create facets. We'll have a FacetGrid
API for low level control, but the main user facing API will still be convenience methods like .plot
.
We could copy this API for pandas. But again, Seaborn already does it -- and does it well. In theory, we might even wrap Seaborn's FacetGrid for this stuff, e.g., df.plot('x', 'y', row='foo', col='bar')
-> sns.FacetGrid(df, row='foo', col='bar').map(plt.plot, 'x', 'y')
. However there would pretty assuredly be some API breaks.