A scatter plot shows the relationship between two continuous variables. Let's create a scatter plot of distance versus time for a car that is accelerating and traveling with an initial velocity. We will generate some random time points according to a function. The relationship between distance and time for a speeding car is as follows:
We can draw a scatter plot to show the relationship between distance and time with the following code:
ggplot(df,aes(x=time,y=distance)) + geom_point()
We can see a positive correlation, meaning that as time increases, distance increases. Take a look at the following code:
a=3.4v0=27time <- runif(50, ...