version 0.12.0: problems interacting subplots and DataFrame().hist() · Issue #4408 · pandas-dev/pandas (original) (raw)

I run Python 2.7.5 on Windows 7 64-bit and IPython 0.13.2.

I have a data frame with some portfolio weights and I do the following:

def weight_histograms(field, name, bins=100):
    if flag_inline:
        plt.figure(figsize=(16, 8))
    else:
        plt.figure()
    plt.subplot(121)
    portfolio_data[field].hist(normed=True, bins=bins)
    plt.title('{}: All'.format(name))
    plt.subplot(122)
    portfolio_data.ix[portfolio_data[field] != 0, field].hist(normed=True, bins=bins)
    plt.title('{}: Non-Zero'.format(name))

With pandas 0.11.0, running

weight_histograms(field_benchmark_weight, 'Benchmark Weights')

in IPython with

and

I get

pandas0 11 0

Doing the same thing with pandas 0.12.0 results in

pandas0 12 0