September 2018
Beginner
206 pages
4h 27m
English
Let's see how you can use the col option provided by the plot() function to change a plot into a few different colors. Follow the steps given below:
plot(iris$Petal.Length, iris$Petal.Width, main = "Petal Width vs. Length", sub = "iris dataset", xlab = "Petal Length", ylab = "Petal Width", col = "blue")
plot(iris$Petal.Length, iris$Petal.Width, main = "Petal Width vs. Length", sub = "iris dataset", xlab = "Petal Length", ylab = "Petal Width", col = "111111")
Output:
Read now
Unlock full access