sample1_x <-
c
(1, 8, 5, 3, 8, 7)
sample1_y <-
c
(4, 6, 3, 8, 2, 7)
windowsFonts
(A =
windowsFont
(
"Rockwell"
))
plot
(sample1_x, sample1_y, family =
"A"
, cex=.8, pch=1,
col=
"red"
, main=
"Plot to show font Change"
)
sample2_x<-
c
(4, 5, 8, 6, 4)
sample2_y<-
c
(9, 8, 2, 3, 1)
sample3_x<-
c
(2, 1, 6, 7, 4)
sample3_y<-
c
(7, 9, 1, 5, 2)
points
(sample2_x, sample2_y, cex=.8, pch=2, col=
"blue"
)
points
(sample3_x, sample3_y, cex=.8, pch=3, col=
"green"
)
legend
(
"topright"
,
c
(
"gfg1"
,
"gfg2"
,
"gfg3"
),
cex=1, col=
c
(
"red"
,
"blue"
,
"green"
), pch=
c
(1, 2, 3))