Re: [R] Superimposing graphs

2014-08-12 Thread Naser Jamil
That's perfect! Many thanks. On 12 August 2014 14:32, Richard M. Heiberger wrote: > Yes, use xlim=c(0, 30) in your definition of P1 > > On Tue, Aug 12, 2014 at 7:26 AM, Naser Jamil > wrote: > > Dear Richard and Duncan, > > your suggestions are absolutely serving what I need. But I would like t

Re: [R] Superimposing graphs

2014-08-12 Thread Richard M. Heiberger
Yes, use xlim=c(0, 30) in your definition of P1 On Tue, Aug 12, 2014 at 7:26 AM, Naser Jamil wrote: > Dear Richard and Duncan, > your suggestions are absolutely serving what I need. But I would like to > see x-axis to be up to 30 instead of 20. Do you have any suggestion on that? > > Many thanks

Re: [R] Superimposing graphs

2014-08-12 Thread Naser Jamil
Dear Richard and Duncan, your suggestions are absolutely serving what I need. But I would like to see x-axis to be up to 30 instead of 20. Do you have any suggestion on that? Many thanks for your kind help. Regards, Jamil. On 12 August 2014 01:22, Duncan Mackay wrote: > Hi > > If you want a

Re: [R] Superimposing graphs

2014-08-11 Thread Duncan Mackay
Hi If you want a 1 package and 1 function approach try this xyplot(conc ~ time | factor(subject, levels = c(2,1,3)), data = data.d, par.settings = list(strip.background = list(col = "transparent")), layout = c(3,1), aspect = 1, type = c("b","g"), scales =

Re: [R] Superimposing graphs

2014-08-11 Thread Rmh
whoops P1<- plot(grouped.data) Sent from my iPhone > On Aug 11, 2014, at 5:06, Naser Jamil wrote: > > Dear R-user, > May I seek your help to sort out a little problem. I have the following > codes > to draw two graphs. I want to superimpose the second one on each of the > first one. > > #

Re: [R] Superimposing graphs

2014-08-11 Thread Richard M. Heiberger
I think this is what you are looking for. library(latticeExtra) t.tmp <-seq(0,30, .01) P1 + layer(panel.xyplot(y=f1(0.5,0.5,0.06, t.tmp), x=t.tmp, type="l", col="black")) Notice that t is a very bad name for your variable as it is the name of a function. I used t.tmp instead. Rich On Mon, Aug