R Code: why use ggplot2 instead of plot()?

R is a fairly intuitive language.  It generally does not take long to learn the different variable types, how to import data, the control statements, etc.  However, when it comes to making graphics, there is so much syntax involved that it can be a bit overwhelming.

What is ggplot2? It is a package for R that contains tools for producing various graphics.  I’ll go further into what it is, and how to use it in another post.  The purpose of this post is to show how using the plot() function in R can get unnecessarily complicated, and that the ggplot2 package is a superior alternative.

Continue reading