Message-ID: <270D69B5A63B19449CDD67332CF7F9BB63578540@INFPWXM004.ad.unsw.edu.au>
Date: 2014-03-24T01:08:55Z
From: Nicholas Hamilton
Subject: Plot question
In-Reply-To: <CANxP2S4TTe3MB-nSziV5m7C0TUzBu7UhBy8HJ8CE9zUoyiHi9g@mail.gmail.com>
Garcia,
Just use ggplot2, here is some code to illustrate:
----------------------
library(ggplot2)
#Create some dummy data with x, y and category columns
mysample <- function(category) data.frame(x=c(1:10),y=c(10:1)*(1+0.25*runif(10)),Category=category)
dfA = mysample("A")
dfB = mysample("B")
dfC = mysample("C")
df = rbind(dfA,dfB,dfC)
#and plot
ggplot(data=df,aes(x,y,color=Category)) + geom_point() + geom_path() + labs(x="xaxis",y="yaxix",title="The title")
---------------------
Regards,
Nicholas Hamilton
UNSW School of Materials Science and Engineering
www.ggtern.com
________________________________________
From: r-sig-ecology-bounces at r-project.org [r-sig-ecology-bounces at r-project.org] on behalf of Luis Fernando Garc?a [luysgarcia at gmail.com]
Sent: Monday, March 24, 2014 11:32 AM
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] Plot question
Dear R friends,
I have to produce a plot like the one attached on the file. The idea is to
plot the time spent for a spider over several different prey, the spiders
were repreated in the different trials. If any of you knows how to perform
this plot or have any source which explains how to do it, I would really
appreciate it.
Thanks in advance.
Plot : http://imgur.com/u1FNmwn