[R] plot.dendrogram() plot margins

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Nov 16 16:34:51 CET 2010



On 15.11.2010 18:35, francois fauteux wrote:
> Hello,
>
> Is it possible to remove those extra margins on the "sample" axis from
> plot.dendrogram:
>
> par(oma=c(0,0,0,0),mar=c(0,0,0,0))
> ddr<-as.dendrogram(hclust(dist(matrix(sample(1:1000,200),nrow=100))))
> stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs="i",leaflab="none")


I guess you want

  par(xaxs="i")
  stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs="i",leaflab="none")

Uwe Ligges




> vs.
>
> stats:::plot.dendrogram(ddr,horiz=T,axes=F,yaxs="i",leaflab="none")
>
> What variable / line of code corresponds to this additional margin space? I
> would like to modify the code to remove the extra space and have that margin
> equal to that when horiz=T, for plotting multiple dendrograms for one images
> on the same device.
>
> Thanks in advance, best.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list