plot(neter365$speed,neter365$soap,col = c("red","blue")[unclass(neter365$line.n)+1],
pch = c(17,19)[unclass(neter365$line.n)+1],ylab = "Soap scrap",
xlab = "Production speed")
legend(x = 280,y = 220,pch = c(17,19),legend = c("line 0", "line 1"),col = c("red","blue"))
Run the code above in your browser using DataLab