Removing x-axis label from dendrogram in r

Elizabeth picture Elizabeth · Sep 17, 2012 · Viewed 19k times · Source

I use xlab="" to suppress the x-label but still get a 'sub-x-label' in my dendrogram. How can I remove this and remove any extra space under the dendrogram?

require(graphics)

hc <- hclust(dist(USArrests), "ave")
plot(hc,xlab="")

enter image description here

Answer

sgibb picture sgibb · Sep 17, 2012

To remove the subtitle use the following:

plot(hc, xlab="", sub="")

To remove the bottom margin (see ?par for details):

par(mar=c(0, 4, 4, 2)) # c(bottom, left, top, right)
plot(hc, xlab="", sub="")