Questions tagged [dendrogram]

A dendrogram (or tree diagram) is a graph used to represent relationships in hierarchical clustering.

Tag usage

Questions on tag should be about implementation and programming problems, not about the statistical or theoretical properties of the technique.
Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

586 questions
10
votes
3 answers

How to create a dendrogram with colored branches?

I would like to create a dendrogram in R which has colored branches, like the one shown below. So far I used following commands to create a standard dendrogram: d <- dist(as.matrix(data[,29])) # find distance matrix hc <- hclust(d) …
beginner
10
votes
1 answer

Tree/dendrogram with elbow connectors in d3

I'm very new to d3.js (and SVG in general), and I want to do something simple: a tree/dendrogram with angled connectors. I have cannibalised the d3 example from here:http://mbostock.github.com/d3/ex/cluster.html and I want to make it more like the…
James B
  • 3,692
  • 1
  • 25
  • 34
9
votes
1 answer

dendrogram in python

I am wanting to write code to draw a dendrogram in python. is there a simple way of going about it. I have written code that identifies clusters in a point dataset and want to produce a dendrogram that shows the amount of clusters produced for each…
geo_pythoncl
  • 927
  • 1
  • 7
  • 13
9
votes
4 answers

Draw dendrogram in python manually

I have implemented an algorithm to solve the problem of clustering in a graph. I used the python library "python-graph" to represent the graph. Now, at each step of my computation (the algorithm is iterative) I have to draw a part of the dendrogram.…
Raffo
  • 1,642
  • 6
  • 24
  • 41
9
votes
1 answer

Dendrogram or Other Plot from Distance Matrix

I have three matrices to compare. Each of them is 5x6. I originally wanted to use hierarchical clustering to cluster the matrices, such that the most similar matrices are grouped, given a threshold of similarity. I could not find any such functions…
amc
  • 813
  • 1
  • 15
  • 28
9
votes
2 answers

Duelling dendrograms in r (Placing dendrograms back to back in r)

Is there any fairly straight forward way of placing two dendrogram 'back to back' in r? The two dendrograms contain the same objects but are clustered in slightly different ways. I need to emphasise how the dendrograms differ. So something like what…
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
8
votes
2 answers

Making simple phylogenetic dendrogram (tree) from a list of species

I want to make a simple phylogenetic tree for a marine biology course as an educative example. I have a list of species with taxonomic rank: Group <-…
Mikko
  • 7,530
  • 8
  • 55
  • 92
8
votes
1 answer

How do I color edges or draw rects correctly in an R dendrogram?

I generated this dendrogram using R's hclust(), as.dendrogram() and plot.dendrogram() functions. I used the dendrapply() function and a local function to color leaves, which is working fine. I have results from a statistical test that indicate if a…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
8
votes
1 answer

Hierarchial Edge Bundling: adding parent group label

I'm quite new to HTML and JavaScript. I'm facing the famous Hierarchical Edge Bundling available here, which is generated by the D3.js library. My goal is to add a semi-circular label zone in order to obtain something like this: every final node…
Marco
  • 367
  • 1
  • 10
8
votes
2 answers

R How to remove labels on dendrogram?

how can I remove all that lables of this plot? Or, maybe even better, how could I make it readable? I created it with this command: plot(hclust(distance), main="Dissimilarity = 1 - Correlation", xlab= NA, sub=NA) I read multiple times, that…
Essi
  • 761
  • 3
  • 12
  • 22
8
votes
1 answer

Save dendrogram to newick format

How can I save a dendrogram generated by scipy into Newick format?
El Dude
  • 5,328
  • 11
  • 54
  • 101
8
votes
3 answers

Tree cut and Rectangles around clusters for a horizontal dendrogram in R

I am trying to plot the results of a hierarchical clustering in R as a dendrogram, with rectangles identifying clusters. The following code does the trick for a vertical dendrogram, but for a horizontal dendrogram, (horiz=TRUE), the rectangles are…
Crops
  • 5,024
  • 5
  • 38
  • 65
8
votes
2 answers

How to color parts of links in dendrograms using scipy in python?

I can color labels in Python dendrograms but I don't know how to color parts of the links belonging its labels.. I want to make something like this: Is it possible in Python? Here I color only labels: import numpy as np import matplotlib.pyplot as…
Stalefish
  • 81
  • 1
  • 5
7
votes
2 answers

Converting ndarray generated by hcluster into a Newick string for use with ete2 package

I have a list of vectors created by running: import hcluster import numpy as np from ete2 import Tree vecs = [np.array(i) for i in document_list] where document_list is a collection of web documents I am analysing. I then perform hierarchical…
user1221408
  • 71
  • 1
  • 3
7
votes
2 answers

Agglomerative Clustering in Matlab

I have a simple 2-dimensional dataset that I wish to cluster in an agglomerative manner (not knowing the optimal number of clusters to use). The only way I've been able to cluster my data successfully is by giving the function a 'maxclust'…
Kevin_TA
  • 4,575
  • 13
  • 48
  • 77
1 2
3
39 40