Re: [R] multiple data sets on one plot

From: Marc Schwartz (via MN) <mschwartz_at_mn.rr.com>
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:

?lines
?points
?segments
?matpoints (Note also matplot() on the same page)
?curve
?arrows

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:

  http://addictedtor.free.fr/graphiques/index.php

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

  http://zoonek2.free.fr/UNIX/48_R/all.html

HTH, Marc Schwartz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.