rootpy.plotting.root2matplotlib.hist2d

rootpy.plotting.root2matplotlib.hist2d(h, axes=None, colorbar=False, **kwargs)[source]

Draw a 2D matplotlib histogram plot from a 2D ROOT histogram.

Parameters:

h : Hist2D

A rootpy Hist2D

axes : matplotlib Axes instance, optional (default=None)

The axes to plot on. If None then use the global current axes.

colorbar : Boolean, optional (default=False)

If True, include a colorbar in the produced plot

kwargs : additional keyword arguments, optional

Additional keyword arguments are passed directly to matplotlib’s hist2d function.

Returns:

Returns the value from matplotlib’s hist2d function.