Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-24 Thread Clint Bowman
Because the range is so different between the two series, I'd suggest using log=y, ylim=c(500,2) Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360)

[R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread varin sacha
Dear R-Experts, I try to superimpose/present 2 curves/plots on the same graph. I would like the result/graph to be readable. For that, I use the par(new=TRUE) argument but on the Y-axis there is a superposition of writings and the Y-axis becomes unreadable. How can I solve this problem ? Here

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Clint Bowman
Try: plot(Date,MORTSBu,lwd=2,lty=dashed,axes=F,xlab=,ylab=) Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600FAX:

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread varin sacha
curves on the same graph with par(new=TRUE) ... and that gives you a double ordinate plot, a staple of misleading statistics. Let me give you an analogy: Imagine you are on a chemistry mailing list and someone asks about the proper way to mix aluminum powder with fertilizer. Of course

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Marc Schwartz
Hi, If he wants the two sets of data plotted on the same y axis scale, with the range of the y axis adjusted to the data, an alternative to the use of plot() and points() is: matplot(Date, cbind(MORTSFr, MORTSBu), type = l) See ?matplot Regards, Marc Schwartz On Mar 23, 2015, at 12:04

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Boris Steipe
Here is how: plot(Date,MORTSFr,type=l, ylim=c(0,max(MORTSFr))) points(Date,MORTSBu,type=l,lty=2) If you don't use the same scale for the two plots, you are probably misrepresenting the data. If you want to plot relative change, normalize the data before plotting. norm - function(x) {(x -

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Boris Steipe
... which is exactly what he shouldn't do because now it the plot falsely asserts that both curves are plotted to the same scale. B. On Mar 23, 2015, at 12:34 PM, Clint Bowman cl...@ecy.wa.gov wrote: Try: plot(Date,MORTSBu,lwd=2,lty=dashed,axes=F,xlab=,ylab=) Clint Bowman

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Clint Bowman
Agreed--I neglected to add the secondary y-axis (shouldn't hit send so fast.) Clint BowmanINTERNET: cl...@ecy.wa.gov Air Quality Modeler INTERNET: cl...@math.utah.edu Department of Ecology VOICE: (360) 407-6815 PO Box 47600

Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)

2015-03-23 Thread Boris Steipe
... and that gives you a double ordinate plot, a staple of misleading statistics. Let me give you an analogy: Imagine you are on a chemistry mailing list and someone asks about the proper way to mix aluminum powder with fertilizer. Of course, as a chemist you know how. But still - and the