[R] Changing Ylab and scale in hclust plots

Steve_Friedman at nps.gov Steve_Friedman at nps.gov
Fri Feb 27 16:03:06 CET 2009


Hello,

Running R 2.8.1 (2008-12-22) on Windows.

I running a series (25)  of clustering procedures using the hclust function
and would like each of the plots to have the same yaxis label and scale in
all of the plots.
Is there a procedure to change the scale on these plots?  Or is there an
alternative clustering function that can give me broader control

Here is my very simple code:

par(mfrow=c(2,1))

NSM5172004 <- read.csv("H:\\HRH-Data_Files\\FrequencyScenarios\\NMS.csv",
header=TRUE, sep=",")
NMS <- NSM5172004[-(1)]
    NMS.dist <- dist(NMS)
plot(hclust(NMS.dist, method = "ward"), xlab="", labels=NMS$Year, main =
"Cape Sable Seaside Sparrow", sub = "Hydro Scenario NMS5172004")


ECB2_65_01 <-
read.csv("H:\\HRH-Data_Files\\FrequencyScenarios\\ECB2_65_01.csv",
header=TRUE, sep=",")
  ECB2 <- ECB2_65_01[-(1)]
   ECB2.dist <- dist(ECB2)
plot(hclust(ECB2.dist, method="ward"), xlab="",labels=ECB2$Year, main="Cape
Sable Seaside Sparrow", sub= "Hydro Scenario ECB2_65-01")

Thanks

Steve

Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034

Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax     (305) 224 - 4147




More information about the R-help mailing list