[R] ploting several functions on the same plot

2013-04-03 Thread Julio Sergio
I want to superimpose two functions plots in the same page. The functions L0 and L1, defined below f0 - function(mu, xm, ds, n) { 1 - pnorm((xm-mu)/(ds/sqrt(n))) } f1 - function(mu,n) f0(mu, 386.8, 48, n) L0 - function(mu) f1(mu, 36) plot(L0,ylim=c(0,1),xlim=c(360,420)) L1 -

Re: [R] ploting several functions on the same plot

2013-04-03 Thread Duncan Murdoch
On 13-04-03 7:35 PM, Julio Sergio wrote: I want to superimpose two functions plots in the same page. The functions L0 and L1, defined below f0 - function(mu, xm, ds, n) { 1 - pnorm((xm-mu)/(ds/sqrt(n))) } f1 - function(mu,n) f0(mu, 386.8, 48, n) L0 - function(mu) f1(mu, 36)

Re: [R] ploting several functions on the same plot

2013-04-03 Thread Julio Sergio
Duncan Murdoch murdoch.duncan at gmail.com writes: curve(L1, add=TRUE) should handle it. Thanks Duncan, Your solution worked great! However, I'm puzzled for a problem in the same line: When I passed a function producer to plot, again it works well; however it doesn't work in the same way