Comments on: Turning up the Heat Maps http://mathematica.blogoverflow.com/2012/10/turning-up-the-heat-maps/ The Mathematica Stack Exchange Blog Tue, 24 Mar 2015 15:38:25 +0000 hourly 1 https://wordpress.org/?v=4.5.6 By: mikeagibson http://mathematica.blogoverflow.com/2012/10/turning-up-the-heat-maps/#comment-27023 Tue, 24 Mar 2015 15:38:25 +0000 http://mathematica.blogoverflow.com/?p=329#comment-27023 FYI, it seems that the column order for the clustering is opposite the column ordering for the heat map.

]]> By: kguler http://mathematica.blogoverflow.com/2012/10/turning-up-the-heat-maps/#comment-46 Sat, 06 Oct 2012 04:47:56 +0000 http://mathematica.blogoverflow.com/?p=329#comment-46 Verbeia, thank you – this is extremely useful for many applications.

In heatmap-dendrogram combinations one typically needs to reshuffle the rows and columns to ensure matching between the dendrogram leafs and the rows/columns in the heatmap. If you add the leaf labels to the dendrograms you see that the leafs and the rows/columns are not mapped correctly. The appropriate reshuffling of the input matrix can be done using the functions Agglomerate and ClusterFlatten in the same package. For example, the input data and the ticks in the matrix plot can be changed using

testdata[[rowShuffle, columnShuffle]]

and

ytixnew = ytix /. Thread[Range[Length[testdata]] -> rowShuffle]; xtixnew = xtix /. Thread[Range[Length[Transpose[testdata]]] -> columnShuffle];

where

rowShuffle = ClusterFlatten[Agglomerate[testdata -> Range[Length[testdata]]]]; columnShuffle = ClusterFlatten[Agglomerate[ Transpose[testdata] -> Range[Length[Transpose[testdata]]]]];

]]>
By: Romke Bontekoe http://mathematica.blogoverflow.com/2012/10/turning-up-the-heat-maps/#comment-40 Wed, 03 Oct 2012 09:43:54 +0000 http://mathematica.blogoverflow.com/?p=329#comment-40 Thank you Verbeia. I have been struggeling with various color schemes in order to get a decent visualization of the data. Should have used Blend[].

]]>