**380**wrote:

I am wanting to flip the dendrogram above my heatmap so that the SC group appears on the left of the heatmap and the IO group appears on the right as opposed to the left. Is there anyway I can do this without removing the dendrograms? The SC is the control group and as such it seems logical that it should be shown first.

Thank you for your input.

Is the Colv argument from the function not working?

Rowvdetermines if and how the row dendrogram should be reordered. By default, it is TRUE, which implies dendrogram is computed and reordered based on row means. If NULL or FALSE, then no dendrogram is computed and no reordering is done. If a dendrogram, then it is used "as-is", ie without any reordering. If a vector of integers, then dendrogram is computed and reordered based on the order of the vector.Colvdetermines if and how the column dendrogram should be reordered. Has the options as the Rowv argument above and additionally when x is a square matrix, Colv="Rowv" means that columns should be treated identically to the rows.Try to feed it a vector of integers and see what happens (e.g. c(4, 5, 6, 1, 2, 3)).

600Hey mate,

I tried Colv but it omits the upset dendogram. Would prefer to keep it o show the distances/ similarity.

When you say feed it a vector can you elaborate? I give heatmap.2 a matrix of values. Even if I reorder the matrix columns, it still puts the heatmap as is. ðŸ˜ž

380Have you looked at the re-order function? Try adding this to the heatmap.2 command and see what happens:

`reorderfun=function(d,w) reorder(d, w, agglo.FUN=mean)`

You can also try changing the distance and linkage functions (and use different combinations of these):

Euclidean distance

1-Pearson correlation distance

Ward's linkage

Complete linkge

60k