I have a 2D numpy array A that contains intensity values corresponding to each point. I am trying to generate a heatmap for these points. For example, if the value at A[3,0] is 230, then I want the square with x-value of 3 and y-value of 0 to correspond to a value of 230.
I've tried simply using the Seaborn heatmap function.
import numpy as np
import seaborn as sns
np.random.seed(0)
A = np.random.uniform(0,500,(4,3))
sns.heatmap(A, square=True)
Where A is just a 4x3 numpy array of random values. The output, however, is a region that looks like the matrix A.
This is a 4x3 region where each point corresponds to a point in the matrix A if it were written out. But I'm not sure how to get it such that I create a heatmap using the actual indices of the matrix as the points. The heatmap in mind would actually be 3x4 and resemble part of a coordinate plane, with x-values of [0,1,2,3] and y-values of [0,1,2].
Sorry if I've explained poorly. I might be severely misunderstanding how a heatmap works, but is there a way to do this(either with or without the heatmap function)? Thanks for reading.

