diff --git a/02-intro2R.Rmd b/02-intro2R.Rmd index 0b8f7bc..7f16681 100644 --- a/02-intro2R.Rmd +++ b/02-intro2R.Rmd @@ -378,7 +378,7 @@ We can modify all the plots by providing certain arguments to the plotting funct hist(x,main="Hello histogram!!!",col="red") ``` -Next, we will make a scatter plot. Scatter plots are one the most common plots you will encounter in data analysis. We will sample another set of 50 values and plotted those against the ones we sampled earlier. Scatterplot shows values of two variables for a set of data points. It is useful to visualize relationships between two variables. It is frequently used in connection with correlation and linear regression. There are other variants of scatter plots which show density of the points with different colors. We will show examples of those that in following chapters. The scatter plot from our sampling experiment is shown in the Figure \@ref(fig:makeScatter). Notice that, in addition to main we used `"xlab"` and `"ylab"` arguments to give labels to the plot. You can customize the plots even more than this. See `?plot` and `?par` for more arguments that can help you customize the plots. +Next, we will make a scatter plot. Scatter plots are one the most common plots you will encounter in data analysis. We will sample another set of 50 values and plot those against the ones we sampled earlier. Scatterplot shows values of two variables for a set of data points. It is useful to visualize relationships between two variables. It is frequently used in connection with correlation and linear regression. There are other variants of scatter plots which show density of the points with different colors. We will show examples of those in following chapters. The scatter plot from our sampling experiment is shown in the Figure \@ref(fig:makeScatter). Notice that, in addition to main we used `"xlab"` and `"ylab"` arguments to give labels to the plot. You can customize the plots even more than this. See `?plot` and `?par` for more arguments that can help you customize the plots. ```{r makeScatter,out.width='50%',fig.width=5, fig.cap="Scatterplot example"} # randomly sample 50 points from normal distribution