ENH/CLN: add HistPlot class inheriting MPLPlot by sinhrks · Pull Request #7809 · pandas-dev/pandas (original) (raw)

Because hist and boxplot are separated from normal plot, there are some inconsistencies with these functions. Looks better to include them to MPLPlot framework.

Maybe scatter and hist can be deprecated in 0.15 if MPLPlot can offer better GroupBy plot (plan to do in separate PR).

Example

This allows to use kind='hist in DataFrame.plot and Series.plot. (No changes for DataFrame.hist)

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

df = pd.DataFrame(np.random.randn(1000, 5))
df.plot(kind='hist', subplots=True)

figure_1

df.plot(kind='hist', stacked=True)

figure_2

Remaining Items