Re: [R] hclust graphics - plotting many points

From: Hans Ekbrand <hans.ekbrand_at_sociology.gu.se>
Date: Tue, 11 Mar 2008 10:43:23 +0100

On Mon, Mar 10, 2008 at 10:19:01AM -0000, michael watson (IAH-C) wrote:
> I'd recommend outputting either as pdf or as a windows metafile
>
> -----Original Message-----
> From: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org]
> On Behalf Of Karin Lagesen
> Sent: 10 March 2008 09:54
> To: r-help_at_r-project.org
> Subject: [R] hclust graphics - plotting many points
>
>
> Hello.
>
> I have a distance matrix with lots of distances that I use hclust to
> organise. I then plot the results using the plot method of hclust.
>
> However, the plot itself takes around 20 mins to make due to there
> being ~700 things in the matrix that I have distances for. I thus
> would like to dump this to some graphics format which will let me
> examine this further.
>
> I tried dumping it to postscript:
>
> postscript("myfile.ps", height = 50, pointsize=5)
> plot(my_hc_object)
> dev.off()
>
> What happens is that since most of the items in the matrix have a
> distance of zero to something everything just becomes a black smear on
> the bottom where I cannot distinguish anything from anything else. I
> thus tried increasing the heigth and/or width and also downscaling the
> pointsize. None of these improved anything much.
>
> So, now I am wondering if any of you have any tips for how I can get
> something like I get in the x11() window which I can also store and
> potentially show other people.

Don't you have the problem of too small distances in the X11() window?

I've had similar problems with a graph in graphviz, where I found it easier to get what I wanted using a png-driver instead of postscript driver.

Png doesn't scale well, but it might be worth a try.

png(file="myfile.png", width=3000, height=2250) plot(my_hc_object)
dev.off()

-- 
Hans Ekbrand (http://sociologi.cjb.net) <hans@sociologi.cjb.net>
GPG Fingerprint: 1408 C8D5 1E7D 4C9C C27E 014F 7C2C 872A 7050 614E

______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Received on Tue 11 Mar 2008 - 20:14:26 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 11 Mar 2008 - 20:30:21 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive