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")
Sur cette page du site, vous pouvez voir la vidéo en ligne plot() function in R| R tutorial 17 | R programming durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Learn2Code 18 septembre 2021, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 33 fois et il a aimé 2 téléspectateurs. Bon visionnage!