Hi I'm just starting off with R but is this correct? I have this data set. > data Type ID Size 1 Reqd 244808 1024 2 Reqd 244045 512 3 Reqd 245427 800 4 Reqd 245423 1024 5 Reqd 244983 1024 6 Used 244808 615 7 Used 244045 33 8 Used 245427 261 9 Used 245423 461 10 Used 244983 1194
I want a scatterplot of the Size values grouped by the Type column. I also want 2 lines showing each group's "average". > library(ggplot2) > data <- read.table("mem.dat", header=T, sep=",") > attach(data) > ggplot(data.frame(Type, ID, Size), aes(x=ID, y=Size, shape=Type, color=Type)) + geom_point(shape=1) + scale_fill_hue(l=40) + geom_line(stat="hline", yintercept=mean, linetype="dashed") > Regards, Alan [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org 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.