python - Plot 2D Histogram as heat map in matplotlib -
I have 3-D data that I want to realize as the following histogram . For each bin, I have a text file like two columns like 1.12 0.65 1.41 0.95 1.78 1.04 2.24 2.12 etc. The first entry in the first column (in .txt) gives me the value of the first tile center, the second row of the first column gives me value for the center of the second tile. The second column refers to the value of the first column on the color bar and bin size is logarithmically different. I would like to plot it in matplotlib as close to the top (ignore the arrows). I recommend that you use polycolation: Import import as imported pl as mp x = np.logspace (1, 2, 20) polys = [] values = [] x (x [: - 1] , X [1:]): y = np.logspace (1.0, 2 + np.random.rand () + 2 * np.log10 (xs), 30) C = -np.log (xs * y) Yp = np.c_ [y [: - 1], y [: - 1], y [1:], y [1:]] xp = np.repeat ([[xs, xe, xe, xs]], Lyn (yp) axis = 0 points = np.dstack ((xp, yp)) polys.append (points) values.append (c [: - 1]) polys = np.concaten...