On Thu, Jul 21, 2011 at 12:33 PM, Dimitri Liakhovitski <dimitri.liakhovit...@gmail.com> wrote: > Thanks a lot, Sarah. > I am definitely going to explore. > A quick question about > mosaicplot(matrix(c(50, 30, 20, 0), 2, 2)) > mosaicplot(matrix(c(0, 50, 20, 30), 2, 2)) > > What are the numbers that appear on the graphs (2.1, 2.2,1.1,1.2)? > Dimitri >
mosaicplot() actually expects a contingency table, so those are the purported group memberships. The resulting boxes are proportional to the cells, which is what you wanted, even though you aren't using it in the intended way. That's also why there's a mark to show the 0 cell in the matrix. Where mosaicplot() starts to really become interesting is when you have multiple-dimension contingency plots. But for your purpose, you can just have a two-dimensional matrix of numbers, and mosaicplot() will draw a corresponding set of proportionally-sized rectangles. Sarah -- Sarah Goslee http://www.functionaldiversity.org ______________________________________________ R-help@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.