Tufte (2001) and Wilkinson (2005) emphasize the aesthetics of graphics a lot. There is indeed more to graphics than mere mathematics, and the subtle changes/corrections in a display may lead to an improved, enhanced, and pleasing feeling on the eye diagrams. Wilkinson emphasizes on what he calls grammar of graphics, and an R adaptation of it is given by Wickham (2009).
Thus far, we have used various functions, such as barchart
, dotchart
, spineplot
, fourfoldplot
, boxplot
, plot
, and so on. The grammar of graphics emphasizes that a statistical graphic is a mapping from data to aesthetic attributes of geometric objects. The aesthetics aspect consist of color, shape, and size, while the geometric objects are composed of points, lines, and bars. A detailed discussion of these aspects is unfortunately not feasible in this book, and we will satisfy ourselves with a quick introduction to the grammar of graphics. To begin with, we will simply consider the qplot
function from...