plot - changing pch with lines in R -
i plot several lines on graph , have them use different pch
:
plot(1:10, sample(1:10,10), pch=3) lines(1:10, sample(1:10,10), pch=1) lines(1:10, sample(1:10,10), pch=2) lines(1:10, sample(1:10,10), pch=3) lines(1:10, sample(1:10,10), pch=4) lines(1:10, sample(1:10,10), pch=5)
however, of lines
commands seem plot using same plotting character ignoring pch
parameter. correct way of doing this?
thanks
default type=
lines l
makes line. plot line , symbol add type="b"
or type="o"
function lines()
.
plot(1:10, sample(1:10,10), pch=3) lines(1:10, sample(1:10,10), pch=1,type="o")
type="o"
means line go "inside" symbol , type="b"
means line end before symbol.
Comments
Post a Comment