Re: [R] multiple data sets on one plot

From: Marc Schwartz (via MN) <>
Date: Thu 08 Jun 2006 - 01:49:52 EST

On Wed, 2006-06-07 at 10:30 -0500, Mark L Sessing wrote:
> Hello,
> I am learning how to use R, and I cannot figure out how to plot more
> than one data set on a single plot. Can you help me out?
> Cheers,
> Mark

It depends upon the type of plot (scatter, lines, bar, etc.) and whether or not you are using R's base graphics or lattice graphics.

With more information, we can offer specific guidance.

For example, with base graphics, you can add additional plot components with:

?matpoints (Note also matplot() on the same page)

A good starting place would be Chapter 12 "Graphical Procedures" in An Introduction to R, which is available within your R installation (on Windows from the GUI menus) or from the Documentation links on the R home page.

An additional resource is the R Graph Gallery:

and Chapter 3 "From Data to Graphics" by Vincent Zoonekynd here:

HTH, Marc Schwartz mailing list PLEASE do read the posting guide! Received on Thu Jun 08 03:18:48 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 08 Jun 2006 - 04:10:35 EST.

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