You can get the minimum and maximum rates that are used to normalize data for color selection.
hb = plt.hexbin(x, y) print hb.norm.vmin, hb.norm.vmax
Then you can go to the norm with this information to the second plot. The problem is that the first graph should have a larger range than the second, otherwise the second graph will not be colored.
Alternatively, and preferably, you can build the rate that you pass to the hexbin function for both of your graphs:
norm = plt.normalize(min_v, max_v) hb1 = plt.hexbin(x1, y1, norm=norm) hb2 = plt.hexbin(x2, y2, norm=norm)
NTN
source share