[R] to draw a too big clutering picture

Peter Langfelder peter.langfelder at gmail.com
Sat Mar 26 00:49:52 CET 2011


On Fri, Mar 25, 2011 at 2:57 PM, wang peter <wng.peter at gmail.com> wrote:
> i did clustering on a data with 497 rows and  71 columns
> but the result picture is too big to display
> how can i display it partly
> this is the code:
> x<-read.table("x",sep=",")
> dim(x)
> library(cluster)
> t<-agnes(x)
> par(ask=T)
> plot(t)

I'm not aware of a possibility to plot only a part of a clustering
tree. However,  you can plot it into a pdf file, for example

pdf(file = "clusterPlot.pdf", width=25, height = 12)
plot(t)
dev.off()

Then look at the pdf file using acrobat reader or similar. Adjust the
width argument if the plot is still too narrow or it becomes too wide.
You can zoom in to see details or zoom out to see the whole picture.
Because pdf is a vector format, plot and font quality is preserved
when zooming in.

HTH,

Peter



More information about the R-help mailing list