I am not able to change the tick labels. For example, I create a heatmap using imshow, and the indices for the heatmap don't correspond to the intensity values. Here is a snippet of code to demonstrate my question:
iters=100
A=np.arange(0,iters+1)/(iters)
B=np.arange(0,iters+1)/(iters)
C = np.zeros((len(A),len(B)))
for i in range(0,len(A)):
for j in range(0,len(B)):
a = A[i]
b = B[j]
C[j][i]=a-b
fig, ax = plt.subplots()
img = ax.imshow(C, cmap='hot', interpolation='none')
plt.colorbar(img)
ax.invert_yaxis()
ax.set_xlabel('A')
ax.set_ylabel('B')
ax.set_xticklabels(A)
ax.set_yticklabels(B)
plt.show()
The values for the X and Y axes in the plot should be labeled according to the values populated in A and B. If I set the ticks according to the arrays A and B, I only get the first few elements. How associate the tick labels with the full range of A and B?