def plot_histograms_it_extra_dims(dataobj, keys, extra_dims, **kwargs):
    """Produce histograms for each group of extra dimensions. \*\*kwargs are
    directly passed on to plot_histograms().


    """
    if isinstance(dataobj, pd.DataFrame):
        df = dataobj
    else:
        df = dataobj.df

    g = df.groupby(extra_dims)

    results = {}
    for name in sorted(g.groups.keys()):
        item = g.get_group(name)
        plot_results = plot_histograms(item, keys, **kwargs)
        results[name] = plot_results

    return results
def plot_histograms_it_extra_dims ( dataobj , keys , extra_dims , ** kwargs ) : if isinstance ( dataobj , pd . DataFrame ) : df = dataobj else : df = dataobj . df g = df . groupby ( extra_dims ) results = { } for name in sorted ( g . groups . keys ( ) ) : item = g . get_group ( name ) plot_results = plot_histograms ( item , keys , ** kwargs ) results [ name ] = plot_results return results
Produce histograms for each group of extra dimensions. \*\*kwargs are
    directly passed on to plot_histograms().