Hello Hossein
A heat map is composed of blobs whose "height" is mapped to a color bar. These "blobs" could be interpolating intermediate values on points that the heat map doesn't have actual values for (following some model).
I am not sure that this would be the right representation for an adjacency or distance matrix.
An adjacency matrix contains, by definition, ones and zeros. So a "checker-board" diagram might be a better way to visually present it. A diagram like this could be used to quickly (and visually) identify clusters between nodes.
The distance matrix, is going to be a matrix of NxN discrete values anyway. In fact, your "problem" when trying to visualise a distance matrix is the fact that the dynamic range of the distance (the range between the min and max values of distance) might be so big that huge values dominate the matrix. This would leave you with an image showing a few really powerful spikes that would be drowning the many smaller values that you might be interested more in.
So, in this case, I would recommend the following:
1) Use the gray colormap to visualise the adjacency matrix (as you do), if you need such a visualisation
2) Use the "rainbow" colormap (this is the blue-to-red color map that could be used to represent temperature in Matplotlib) to visualise the distance matrix BUT, before sending the matrix to imshow, pass it through a log transform, something like M = log(1+ D) where D is your original distance matrix and M is your transformed matrix. For more information on this, please see:
http://homepages.inf.ed.ac.uk/rbf/HIPR2/pixlog.htmI hope this helps.
All the best
Athanasios Anastasiou