[R] scatterplot function - double check: dashed lines

K F Pearce k.f.pearce at newcastle.ac.uk
Tue Jun 8 12:44:56 CEST 2010


Hello everyone,

This is just a quick double check.  It concerns the 'scatterplot function' in R. 

 I have 6 curves and I wish to represent each of them by a different kind of line (their colour must be black).

The curves are derived from the cuminc function...the coordinates of which are in 'xx'.

Upon reading the documentation in R, it looks like I can use the 'on/off' command for lty and I can merely run:

plot(xx,color="black",lty=c("11","13","1343","73","2262","35"))

according to the documentation, "13" (for example) means 1 'on' and 3 'off' .

Does the above look OK ?

Say, in another study, I wish to draw my 6 lines all in different colours (solid lines), I suppose that I could type:

plot(xx, color=c("red","black","purple","yellow","brown","violet"), lty=1)

Thanks so much for your help,
All the Best,
Kim



More information about the R-help mailing list