DoHeatmap Hierarchical Clustering Seurat
You need to order the marker matrix (e.g. by avg_logFC) before calling DoHeatMap.

library(dplyr)
all.markers &lt;- FindAllMarkers(object = obj)
top20 &lt;- all.markers %&gt;% group_by(cluster) %&gt;% top_n(20, avg_logFC)
DoHeatmap(object = obj, genes.use = top20$gene, slim.col.label = TRUE, remove.key = TRUE)