Plot question
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
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