I have a (21,100)-array and want to plot it as 2D-Histogram (heatmap).
If I plot it naively with histogram2d(A, nbins= 20)
it only plots the first 21 points.
I tried to loop it, but then I had 100 histograms with 21 points. Another idea would be to put the data in a (2100)-array but this seems like a bad idea.
Addition: I have a scatter plot/data and want it shown as a heatmap. The more points in one bin the "darker" the color. So I have 21 x-values each with 100 y-values.
histogram2d(randn(1_000), randn(1_000))
, so it expects them both to be the same length. A heatmap is different in that it directly uses the dimensions ofA
and then colour codes the values in each[i, j]
location of your matrix (checkheatmap(A)
) - could you clarify what your array is and what you would expect a histogram to do with a 21x100 matrix?