### R code ###
library(ggplot2)
### create data ####
vals <- rnorm(400)
div<- c(rep("A",100),rep("B",100),rep("C",100),rep("D",100))
n<- rep(1:100,4)
df<- data.frame(div= as.factor(div),vals=vals,n=n)
### ggplot function ####
qplot(x=n,y=vals, colour = div ,geom = "line",data=df)
What I would like to see is a line plot where I can have lines for groups A,
and B in colour and lines for C and D in dotted and dashed respectively.
Also, I would like to know how I can draw two lines (groups C and D) which
are both dotted.
Thanks
Regards
Harsh Singhal
[[alternative HTML version deleted]]
______________________________________________
R-h...@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.
> Also, I would like to know how I can draw two lines (groups C and D) which
> are both dotted.
>
For graphic specifications see Hadley' instructions:
http://had.co.nz/ggplot2/book/specifications.pdf
Ciao,
domenico