Hi, Michael, Thank you for your help! In its simplified form, the data frame looks like:
idx true_value mean diff_mean1 diff_mean2 diff_mean3 sdt diff_std1 diff_std2 diff_std3 samplesize 1 1000 2 1000 3 1000 4 1000 5 1000 1 5000 2 5000 3 5000 4 5000 5 5000 I would like the plot to be: row1 has 4 subplots for samplesize 1000; row2 has 4 subplots for samplesize 5000; in each row: the 1st subplot is true_value against mean; the 2nd is an overlay plot for idx against diff_mean1, idx against diff_mean2, idx against diff_mean3; the 3rd is true_value against std; the 4th is an overlay plot for idx against diff_std1, idx against diff_std2, idx against diff_std3. I have looked at sample xyplot codes, but still did not know how to realize this. Thanks again! Chee From: R. Michael Weylandt Sent: Saturday, March 10, 2012 12:20 PM To: Chee Chen Cc: R-ORG Subject: Re: [R] Help on subgraphs in xyplot of lattice library What does your data look like....dput() is your friend. Also, it'd be helpful if you could give base graphics code for more-or-less what you are looking for (since you can do so already) as it's pretty hard to describe graphics without pictures. Running example(xyplot) might help you get started as well. Michael On Sat, Mar 10, 2012 at 12:04 PM, Chee Chen <chee.c...@yahoo.com> wrote: > Dear All, > I would like to ask a question on how to do overlay plots in each subgraph of > xyplot. > 1. I did simulations for m=1000, 2500, 5000, 10000, as the sample sizes. > 2. for each sample size value m, 4 graphs are generated; each graph contains > overlayed comparisons between 4 methods, > 3. now I want put them into a 4-by-4 plot by xyplot, i.e., 4 sample size > values, each of which has 4 plots. > > I know how to do this using plot, but the spaces between subplots are big. > > I do not know how to make each subplot in xyplot an overlayed one as it would > appear using plot. > > Any help would be appreciated! > > Thank you, > Chee > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. [[alternative HTML version deleted]] ______________________________________________ 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.