With matplot you can plot the columns of matrices. So it will allow you to draw several data sets at the same time and creates a graph by overlaying the different plots. For example we have three different measurement values we want to show in one plot. So for each x-value we have three y-values. At first you have to create a data frame with the measurement data. Then you can draw the matplot and define visualization parameters for each of the three data sets. Within the following example we will set the parameters for the line style, the point style and the color of each data set.
x = 1:8
y1 = c(5, 7, 9, 11, 12, 14, 15, 17)
y2 = c(7, 16, 24, 31, 37, 42, 46, 49)
y3 = c(10, 14, 18, 28, 31, 35, 38, 40)
y = data.frame(y1,y2,y3)
matplot(x,y, type=c(‚l‘,’b‘,’s‘), pch=c(1,2,3), col=c(‚red‘,’green‘,’blue‘))