plot() function in R| R tutorial 17 | R programming

Published: 18 September 2021
on channel: Learn2Code
33
2

In this video we will learn about plot() function in R.
https://techstats.in/blogs/

Code is below:

plot() function

x= c(10,20,30,40,50,60)
y = c(150,250,350,400,500,600)
plot(x,y)


#Now we will add names to our plot and both the axis
plot(x,y,main = "Plot of X and Y Axis for Data Analysis",xlab = "X axis analysis",ylab = "Y axis analysis")





#If you want to change the shape/size/color of points being plotted.
plot(x,y,main = "Title of my Graph", xlab = "X axis data" , ylab = "Y axis data",lwd = 2,pch=1,cex=1,col="red")
#





#Change the background color of the graph
We will use par() which means parameter

par(bg="yellow")
plot(x,y,main = "Title of my Graph", xlab = "X axis data" , ylab = "Y axis data",lwd = 2,pch=1,cex=,col="blue")



NOw we want to connect all the points in the plot.
x= c(10,20,30,40,50)
y = c(100,200,300,400,500)
par(bg="white")
plot(x,y,main = "Title of my Graph", xlab = "X axis data" , ylab = "Y axis data",lwd = 2,col="blue")
lines(x,y,lwd=3,col="yellow")


On this page of the site you can watch the video online plot() function in R| R tutorial 17 | R programming with a duration of hours minute second in good quality, which was uploaded by the user Learn2Code 18 September 2021, share the link with friends and acquaintances, this video has already been watched 33 times on youtube and it was liked by 2 viewers. Enjoy your viewing!