[R] Making two lines graph ...
Petar Milin
pmilin at gmail.com
Sat Feb 24 13:00:15 CET 2007
Hello!
Can anyone help me to build a graph with the alphanumeric values on
x-axis, with two lines (preferably doted and solid, or similar) that
present values on y-axes. In a toy example, data frame could be like
this:
x.orig x.num y1 y2
a 1 0.2 0.4
b 2 0.1 0.1
c 3 0.3 0.3
d 4 0.3 0.15
e 5 0.1 0.05
I can make graph only if I use values converted to numeric in "x.num",
but not original "X.orig":
matplot(dat$x.num, dat[, c("y1","y2")], type="b", lty=1, ylab="(1) y1,
(2) y2")
Also, how to make doted and solid instead of coloured lines?
Thanks in advance. Sincerely,
Petar M
More information about the R-help
mailing list