[R] Fwd: dendrogram
joris meys
jorismeys at gmail.com
Tue Nov 17 01:37:40 CET 2009
I was missing something. Thx Dennis.
---------- Forwarded message ----------
From: Dennis Murphy <djmuser at gmail.com>
Date: Tue, Nov 17, 2009 at 12:34 AM
Subject: Re: dendrogram
To: jorismeys at gmail.com
Hi,
There are a couple of things you could do to pull the text back into
the dendrogram plot,
both of which I found by looking at the example for pltree.twins() in
the cluster package.
Method 1: Adjust the graphical parameters to add more space on the right:
op <- par(mar = par("mar") + c(0,0,0, 2))
plot(as.dendrogram(TestAgnes), horiz = TRUE, center = TRUE)
par(op) # returns graphical parameters to their original state
Method 2: Reduce the font size of the labels (very useful if the
dendrogram has a large
number of labels.
plot(as.dendrogram(TestAgnes), horiz = TRUE, center = TRUE,
nodePar = list(lab.cex = 0.7, pch = NA))
Why did I look at pltree.twins?
> class(TestAgnes)
[1] "agnes" "twins"
HTH.
DM
More information about the R-help
mailing list