I am trying to plot a ROOT 2D histogram with rootpy and matplotlib. The code I use for this is: from xbook.info import File from xbook.infong import Hist import xbook.info2matplotlib as. import xbook.info as plt import numpy as np from matplotlib import colors from xbook.info import PercentFormatter # Fixing random state for reproducibility np. random. seed () Generate data and plot a simple histogram ¶. import numpy as np mu, sigma = , 15 x = mu + sigma * xbook.info() import xbook.info as plt xbook.info(x, bins=50) xbook.infog('xbook.info') Also check out the matplotlib gallery and the matplotlib examples. In this tutorial, you'll be equipped to make production-quality, presentation-ready Python histogram plots with a range of choices and features. #83 adjust bin size of 2D histogram. This page is dedicated to 2D histograms made with matplotlib, through the hist2D function. 2D histograms are useful when . This is similar to a one-dimensional histogram, but it describes the joint variation of two In matplotlib, one function to visualize 2-D histograms is xbook.info2d().