[R] Plotting Dendrogram Help Getting Plot to Display Neatly

Jim Lemon jim at bitwrit.com.au
Sat Mar 1 09:26:09 CET 2008


ngottlieb at marinercapital.com wrote:
> I have done a cluster analysis doing:
> 
> 1-clusNorth <-hclust(dist(Artorious)^2, method="ward")
> 2-clusNorth$labels <-Artorious$Name   ## to show the case names and not
> numbers
> 3-dend1 <- as.dendrogram(clusNorth)
> 4-plot(dend1)
> 
> My Dendrogram is now showing the names of my cases in the dataframe on
> the x axis
> 
> 1                    OMNICELL INC COM  
> 2                GETTY IMAGES INC COM 
> 3     INTERCONTINENTALEXCHANGE IN COM
> 4         OPTIONSXPRESS HLDGS INC COM  
> 5          SUPERIOR WELL SVCS INC COM 
> 6                         HCP INC COM  
> 7      SENIOR HSG PPTYS TR SH BEN INT  
> 8     NATIONWIDE HEALTH PPTYS INC COM  
> 9            DUKE REALTY CORP COM NEW  
> 10           HEALTH CARE REIT INC COM  
> 11   POWERSHARES QQQ TRUST UNIT SER 1  
> 12           FLEXTRONICS INTL LTD ORD  
> 13                     VENTAS INC COM
> 
> 
> However with 60 cases the names above are not fitting neatly into plot.
> Can someone advice on plot
> Parameters to fix the size of dendrogram and see the full names on X
> axis?
> 
Hi Neil,
If the names are not too crowded, staxlab in the plotrix package might 
do it.

Jim



More information about the R-help mailing list