Skip to content
Prev 4406 / 7420 Next

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