> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project.org] On Behalf Of jricci
> Sent: Tuesday, October 04, 2011 1:28 PM
> To: r-help@r-project.org
> Subject: Re: [R] how do i put two scatterplots on same graph
>
> I am n
I am new at this. The two data sets don't have color variable just paired data.
How should I structure the data sets in R?
Joe Ricci
From: William Revelle [via R]
To: Joe Ricci
Sent: Tue Oct 04 11:18:20 2011
Subject: Re: how do i put two scatterplots on same grap
If the data are from one data.frame (e.g., the iris data set), then simply
label the red and white flowers with different colors:
e.g.,
with the iris data set
plot(iris$Sepal.Length,iris$Sepal.Width,col=c("red","blue","black")[iris$Species],pch=c(16:18)[iris$Species])
Bill
On Oct 4, 2011,
On 10/04/2011 06:19 AM, jricci wrote:
> Have two sets of scatterplot data
> hypothetically
> a) stem lenght vs number of petals in red flowers
> b) stem lenght vs number of petals in white flowers
>
> want to place on same scatter plot with same x,y axis but different collored
> markers
>
> How d
Have two sets of scatterplot data
hypothetically
a) stem lenght vs number of petals in red flowers
b) stem lenght vs number of petals in white flowers
want to place on same scatter plot with same x,y axis but different collored
markers
How do I do this in R
--
View this message in context:
ht
?plot
?points
You will probably need to get some R basics down as to how to index certain
subsets of your data. This you find in any introductory R manual.
HTH,
Daniel
--
View this message in context:
http://r.789695.n4.nabble.com/how-do-i-put-two-scatterplots-on-same-graph-tp3870030p3870074.ht
6 matches
Mail list logo