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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -