[R] Multiple scatterplots
Bert Gunter
gunter.berton at gene.com
Thu May 3 00:58:07 CEST 2007
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
--- Kostadin Cholakov <kcholakov at gmail.com> wrote:
> 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.
More information about the R-help
mailing list