# Reorder dendrogram/heatmap for pl.rank\_genes\_groups\_heatmap

**URL:** <https://discourse.scverse.org/t/reorder-dendrogram-heatmap-for-pl-rank-genes-groups-heatmap/1543>\
**Category:** scanpy\
**Created:** [June 22, 2023, 1:06pm UTC](https://discourse.scverse.org/t/reorder-dendrogram-heatmap-for-pl-rank-genes-groups-heatmap/1543 "2023-06-22T13:06:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lilywright99](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/lilywright99/32/718_2.png) [@lilywright99](https://discourse.scverse.org/u/lilywright99)\
**Post date:** [June 22, 2023, 1:06pm UTC](https://discourse.scverse.org/t/reorder-dendrogram-heatmap-for-pl-rank-genes-groups-heatmap/1543/1 "2023-06-22T13:06:53Z")

</div>

Hi all,

For aesthetic purposes, I want to flip some arms of the initial dendrogram (sc.tl.dendrogram) used for sc.pl.rank\_genes\_groups\_heatmap and reorder some of the clusters.

There are no parameters in either sc.tl.dendrogram or sc.pl.rank\_genes\_groups\_heatmap which allow me to reorder or flip the dendrogram or the heatmap.  
Does anyone have any suggestions for how I can go about doing this?

Any ideas appreciated!  
Many thanks
