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) 407-6
Dear all,
Excellent, many thanks for everything.
Best,S
De : Boris Steipe
À : Clint Bowman
Cc : varin sacha ; "r-help@r-project.org"
Envoyé le : Lundi 23 mars 2015 19h32
Objet : Re: [R] Superimposing 2 curves on the same graph with par(new=TRUE)
... and that gives you
... 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 s
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
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:
... 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 wrote:
> Try:
> plot(Date,MORTSBu,lwd=2,lty="dashed",axes=F,xlab="",ylab="")
>
>
>
> 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 47600F
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 -
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 i
9 matches
Mail list logo