[R] Forcing ticks in plot for hclust object outside the limits

Aleš Žiberna ales.ziberna at guest.arnes.si
Sat May 28 19:07:56 CEST 2005


Hello!

I have the following problem.

I would like to plot the hclust object "hcd" (bellow, at the end of the 
mail) with ticks at seq(0.05,0.25,by=0.05). I tried using the code
plot(hcd)
and
plot(hcd,axes=FALSE)
axis(2,seq(0.05,0.25,by=0.05))

In both cases, the resoult is the same, ticks at 0.05 and 0.25 are not 
printed. I tried changing the ylim argumet in plot, however I got a warning 
"parameter "ylim" couldn't be set in high-level plot() function".

I would like to force those two ticks. Can this be done with axis or plot, 
or should I use "lines"?

Thanks in advance for any suggestions!
Aleš Žiberna


"hcd" <-
structure(list(merge = structure(as.integer(c(-4, -5, -1, -7,
-6, -10, -3, -12, -8, -2, 8, 1, -9, -11, 2, 3, -13, 4, 6, 5,
7, 9, 10, 11)), .Dim = as.integer(c(12, 2))), height = c(0.0906288626438465,
0.10278145998519, 0.114885217561497, 0.127812745765521, 0.132377986666522,
0.168594637784091, 0.177187802444346, 0.209803430657638, 0.210361529934791,
0.218946973173863, 0.234000873708654, 0.235702383243089), order = 
as.integer(c(4,
9, 12, 6, 13, 2, 8, 3, 10, 7, 1, 5, 11)), labels = NULL, method = "single",
    call = quote(hclust(d = d, method = "single")), dist.method = NULL), 
.Names = c("merge",
"height", "order", "labels", "method", "call", "dist.method"), class = 
"hclust")




More information about the R-help mailing list