Experiment 3
Experiment 3
• More than one line can be drawn on the same chart by using the
lines()function.
• After the first line is plotted, the lines() function can use an additional
vector as input to draw the second line in the chart,
• # Create the data for the chart.
• v <- c(7,12,28,3,41)
• t <- c(14,7,6,19,3)
• A<- c(7,12,28,3,41)
• B<- C( 5,12,14,23,25)
• C<-C(21,24,13,15,18)
• D<-c(21,24,9,10,4,7)
• E<- c(22,24,26,12,15)
• plot(B,type = "o",col = "red", xlab = “student", ylab = “attendance ",
main = “Atendance report")
• lines(D, type = "o", col = "blue")
• # Save the file.