On Thu, 20 Jul 2006, Kie Zuraw wrote: > Thank you very much, Gabor Grothendieck and Muhammad Subianto. Both of > these work perfectly. I think I was misunderstanding gp and gpar() > before. Again, thank you both.
Two further additions to this: > > Maybe like this: > > mosaic(allmorph, direction = "v", pop = FALSE, > > gp=gpar(fill=c(grey(0.8),grey(0.4)))) This works because the fill pattern is expanded along the "dependent" variable (last splitting variable) in the plot. In general you can supply arbitrary patterns by supplying a fill pattern of the same dimension as the original table, e.g., mycol <- allmorph mycol[,1] <- grey.colors(2)[2] mycol[,2] <- grey.colors(2)[1] mycol[1,2] <- grey(0) mosaic(allmorph, split_vertical = TRUE, gp = gpar(fill = mycol)) Furthermore, several high-level functions producing similar pictures are available, in particular doubledecker(allmorph) doubledecker(allmorph, col = grey.colors(2)[2:1]) or spine(allmorph) Note that the latter is not based on strucplot() and hence can not be labeled with the labeling functions for mosaic(). Best, Z ______________________________________________ [email protected] 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.
