Base Plots
plot draws scatter plots and lines. Titles and labels are arguments.
Example
x <- 1:10
y <- x ^ 2
plot(x, y, main = "Squares", xlab = "n", ylab = "n squared", pch = 19, col = "steelblue")
lines(x, y)
abline(h = 50, lty = 2)Exercise
Plot points.
(x, y)Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.