# midwest <- read.csv("") # bkup data source # Scatterplot ![]() Theme_set( theme_bw()) # pre-set the bw theme. # install.packages("ggplot2") # load package and data options( scipen= 999) # turn-off scientific notation like 1e+48 library(ggplot2) Additionally, geom_smooth which draws a smoothing line (based on loess) by default, can be tweaked to draw the line of best fit by setting method='lm'. Whenever you want to understand the nature of relationship between two variables, invariably the first choice is the scatterplot. The most frequently used plot for data analysis is undoubtedly the scatterplot. The following plots help to examine how well correlated two variables are. Chances are it will fall under one (or sometimes more) of these 8 categories. So, before you actually make the plot, try and figure what findings and relationships you would like to convey or examine through the visualization. Primarily, there are 8 types of objectives you may construct plots. The list below sorts the visualizations based on its primary purpose.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |