Re: [R] scatterplot function - double check: dashed lines

From: Jim Lemon <>
Date: Wed, 09 Jun 2010 18:59:26 +1000

On 06/08/2010 08:44 PM, K F Pearce wrote:
> 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)
Hi Kim,
It depends upon what the object(s) are that contain the values for the curves. If these are in a matrix or data frame, you would probably want:


Although I agree with Greg, and find myself scratching my glabella in confusion when I have to decipher plots like that. If the lines are separated at the right edge of the plot, you might try leaving some extra margin there and labeling them as Greg suggested.

You can get a combination of these effects with something like this:


Jim mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 09 Jun 2010 - 08:57:34 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 09:10:28 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive