Re: [Rd] plot.dendrogram xlim/ylim

2008-07-24 Thread Martin Maechler
 FA == Felix Andrews [EMAIL PROTECTED]
 on Thu, 24 Jul 2008 13:16:22 +1000 writes:

FA list(...), I would like to zoom in to the leaves of
FA large trees in a dendrogram plot. The playwith package
FA allows zooming by passing xlim and ylim arguments to the
FA plot call (Hmisc does this too I think). But currently
FA stats:::plot.dendrogram does not accept xlim or ylim. So
FA I would like to enable that. In place of the existing
FA code chunk:

   xlim - c(x1 - 1/2, x2 + 1/2)
   ylim - c(0, yTop)
   if (horiz) {
   xl - xlim
   xlim - rev(ylim)
   ylim - xl
   tmp - xaxt
   xaxt - yaxt
   yaxt - tmp
   }
   plot(0, xlim = xlim, ylim = ylim, ..
   
   I propose something like:
   
   function(..., xlim, ylim)
   
   xlim0 - c(x1 - 1/2, x2 + 1/2)
   ylim0 - c(0, yTop)
   if (horiz) {
   xl - xlim0
   xlim0 - rev(ylim0)
   ylim - xl
   tmp - xaxt
   xaxt - yaxt
   yaxt - tmp
   }
   if (missing(xlim)) xlim - xlim0
   if (missing(ylim)) ylim - ylim0
   plot(0, xlim = xlim, ylim = ylim, ..

Thank you for the suggestion!
Yes, something like this will be part of R 2.8.0
(or 'R-devel' as from tomorrow).

Martin Maechler, ETH Zurich

  -- 
  Felix Andrews / 安福立
  PhD candidate
  Integrated Catchment Assessment and Management Centre
  The Fenner School of Environment and Society
  The Australian National University (Building 48A), ACT 0200
  Beijing Bag, Locked Bag 40, Kingston ACT 2604
  http://www.neurofractal.org/felix/
  3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] plot.dendrogram xlim/ylim

2008-07-23 Thread Felix Andrews
list(...),

I would like to zoom in to the leaves of large trees in a dendrogram
plot. The playwith package allows zooming by passing xlim and ylim
arguments to the plot call (Hmisc does this too I think). But
currently stats:::plot.dendrogram does not accept xlim or ylim. So I
would like to enable that. In place of the existing code chunk:

xlim - c(x1 - 1/2, x2 + 1/2)
ylim - c(0, yTop)
if (horiz) {
xl - xlim
xlim - rev(ylim)
ylim - xl
tmp - xaxt
xaxt - yaxt
yaxt - tmp
}
plot(0, xlim = xlim, ylim = ylim, ..

I propose something like:

function(..., xlim, ylim)

xlim0 - c(x1 - 1/2, x2 + 1/2)
ylim0 - c(0, yTop)
if (horiz) {
xl - xlim0
xlim0 - rev(ylim0)
ylim - xl
tmp - xaxt
xaxt - yaxt
yaxt - tmp
}
if (missing(xlim)) xlim - xlim0
if (missing(ylim)) ylim - ylim0
plot(0, xlim = xlim, ylim = ylim, ..


Regards,
Felix

-- 
Felix Andrews / 安福立
PhD candidate
Integrated Catchment Assessment and Management Centre
The Fenner School of Environment and Society
The Australian National University (Building 48A), ACT 0200
Beijing Bag, Locked Bag 40, Kingston ACT 2604
http://www.neurofractal.org/felix/
3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel