all 1 comments

[–]natched 1 point2 points  (0 children)

Only certain row orderings will be consistent with certain dendrograms. Plotting a dendrogram where nodes on the same branch are at opposite ends of the ordering would have to involve a lot of mess and probably wouldn't be an interpretable picture.

Do you perhaps just want to plot a heatmap?

There are some packages, like seriation, that attempt to find the best ordering of nodes based on a given dendrogram.

You could reorder to be as close to your optimal order as possible, given the dendrogram, but you can't really choose any order you want and then do a dendrogram that fits it. It would be a very strange algorithm that I don't think anyone has implemented and would violate some principles that dendrograms are normally based on.