August 2015
Beginner to intermediate
294 pages
5h 20m
English
A heatmap is a graphical representation where individual values of a matrix are represented as colors. A heatmap is very useful in visualizing the concentration of values between two dimensions of a matrix. This helps in finding patterns and gives a perspective of depth.
Let's start off by creating a basic heatmap between two dimensions. We'll create a 10 x 6 matrix of random values and visualize it as a heatmap:
>>> # Generate Data >>> data = np.random.rand(10,6) >>> rows = list('ZYXWVUTSRQ') #Ylabel >>> columns = list('ABCDEF') #Xlabel >>> #Basic Heat Map plot >>> plt.pcolor(data) >>> plt.show()
After the preceding code is executed we'll get the following output:
In the preceding code, we used the pcolor() function to create the heatmap ...
Read now
Unlock full access