A <-
matrix
(
c
(
c
(0,1,2,3,5),
c
(1,3,4,2,4)), ncol=2 )
B <-
matrix
(
c
(
c
(3,1,2,3,4),
c
(4,2,1,1,2)), ncol=2 )
C <-
matrix
(
c
(
c
(1,1,2,4,5),
c
(4,4,0,1,2)), ncol=2 )
data <-
data.frame
(A,B)
plot
( 0, type =
"b"
, xlim=
c
(0,5), ylim=
c
(0,5) )
lines
( A, col =
"red"
)
points
( A, col =
"yellow"
, pch=16 )
lines
( C, col =
"green"
)
points
( C, col =
"pink"
, pch=15 )
lines
( B, col =
"blue"
)
points
( B, col =
"violet"
, pch=17 )
legend
( x=
"topright"
,
legend=
c
(
"Red line, Yellow points"
,"Blue line,
iolet points
","
Green line,Pink points"),
col=
c
(
"red"
,
"blue"
,
"green"
), lwd=1, lty=
c
(1,1,1),
pch=
c
(
NA
,
NA
),cex=0.5 )
legend
( x=
"topright"
,
legend=
c
(
"Red line, Yellow points"
,"Blue line,
violet points
","
Green line,Pink points"),
col=
c
(
"yellow"
,
"purple"
,
"pink"
), lwd=1, lty=
c
(0,0,0),
pch=
c
(16,15,17),cex=0.5 )