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")
In questa pagina del sito puoi guardare il video online plot() function in R| R tutorial 17 | R programming della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Learn2Code 18 settembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 33 volte e gli è piaciuto 2 spettatori. Buona visione!