[R] levelplot border and dendrogram width

From: Paul Boutros <paul.boutros_at_utoronto.ca>
Date: Sun, 16 Dec 2007 17:13:36 -0500


I'm trying to learn how to use lattice and levelplot in particular. There are three elements of customizing the plots I'm stuck with:

  1. Is there a way to put borders around each "cell" within a level-plot. I'm trying to do something like the colsep/rowsep/sepcolor/sepwidth parameters of heatmap.2 in gplots
  2. Can I alter the line-width of dendrogram added to the levelplot using latticeExtra?
  3. Can I alter the spacing between the dendrogram and a row of coloured rectanges added to a dendrogram using the add option?

The basic code-example that I've been trying to tweak is below, any suggestions and hints are very much welcome!! In particular, I'm not sure where to find documentation on parameters for these, so hints on where to look would be great!



tmp <- rnorm(100);
tmp <- matrix(data = tmp, nrow = 10, ncol = 10);

dd.row <- as.dendrogram( hclust( dist( tmp ) ) );


	tmp[order.dendrogram(dd.row), ],
	aspect = "fill",
	scales = list(
		x = list(rot = 90)

colorkey = list( space = "left"
legend = list( top = list( fun = dendrogramGrob, args = list( x = dd.row, ord = order.dendrogram(dd.row), side = "top", add = list( rect = list( col = "black", fill = c( rep("blue", 5), rep("green",5) ), lwd = 3 ), type = "rectangle" ), size.add = 1, size = 10, type = "rectangle" ) ) ) ); ______________________________________________
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 Sun 16 Dec 2007 - 22:21:33 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 Mon 17 Dec 2007 - 01:30:18 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.