Does the following code do something like what you want (but with the built in data):
> plot(as.integer(state.region), state.x77[,'Murder'], + xaxt='n', xlim=c(0,5), col=as.integer(state.region)) > axis(1, at=1:4, labels=levels(state.region)) > > oo <- order(order( as.integer(state.region), state.x77[,'Murder'] )) > > tmp.p <- rep( c(2,4), length=50 )[oo] > > text(as.integer(state.region), state.x77[,'Murder'], state.name, pos=tmp.p, + col=as.integer(state.region)) > If that is not what you want, then maybe you could give us some more detail so we can better understand. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Caroline Nganga > Sent: Tuesday, August 21, 2007 11:01 AM > To: r-help@stat.math.ethz.ch > Subject: [R] divided scatter plots > > I have a data set which contains two columns. The first > column is a list of countries, and the second column contains > their political risk ratings. I would like to create one > large plot that contains 5 different sections, each with a > scatter plot. To clarify, I have divided the countries into 5 > groups. For each group (continent), I would like to have the > name of the continent on the x-axis, and points representing > countries and their risk rating on the y-axis. However, I > want all 5 scatter plots to be in one large plot. What > function should I use to do this? Also, is it possible to > label each point? > thanks for any help! > > ______________________________________________ > 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 > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ 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 and provide commented, minimal, self-contained, reproducible code.