Re: [R] Multiple scatterplots

From: Bert Gunter <gunter.berton_at_gene.com>
Date: Wed, 02 May 2007 15:58:07 -0700


Please note: in R you can specify (some of the) graphics parameters as the appropriate length vectors. So your plot example below can also be done as, for example:

plot(
rep.int(aa,3),c(cc,bb,dd),col=rep(c("red","blue","green"),e=length(aa)))

However, this doesn't seem to fit the posted request, where maybe something like a trellis plot of the different distributions is what is wanted?? -- but I may well misunderstand.  

Bert Gunter
Genentech Nonclinical Statistics

-----Original Message-----
From: r-help-bounces_at_stat.math.ethz.ch
[mailto:r-help-bounces_at_stat.math.ethz.ch] On Behalf Of John Kane Sent: Wednesday, May 02, 2007 11:06 AM
To: Kostadin Cholakov; r-help_at_stat.math.ethz.ch Subject: Re: [R] Multiple scatterplots

Your title and your posting do not say the same thing.  

Assuming you want all three distributions on one scatter plot does this help?

aa <- 1:10
bb <- 11:2
cc <- bb^2
dd <- c(3,4,7,9,11,32,11,14,5,9)

plot(aa,cc, col="red")
points(aa,bb, col="blue")
points(aa,dd, col="green")

Also in plotting it is a good idea to look at all the variations etc that you can get with par()

Type ?par

> Hi,
>
> I have to plot three Ziph distributions for three
> languages where the
> x value represents the rank of a given word and the
> y value represents
> the relative frequency of this word in the corpus.
> Is there some way
> so that I can plot all three distributions on a
> single scatterplot,
> preferably with different colours :) I tried to find
> something in the
> R manual but there are no such examples :( Thank
> you!
>
> ______________________________________________
> R-help_at_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_at_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_at_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. Received on Wed 02 May 2007 - 23:09:53 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 Thu 03 May 2007 - 13:31:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.