ggplot2 (an acronym for Grammar of Graphics plot) is the most popular graphical package in R. This relies mainly on the fact that almost anything can be drawn with it. This huge flexibility, however, implies more complexity while drawing.
The underlying concept of
ggplot2 is an empty canvas. Instead of specifying the type of plot and the data to be visualized, the
ggplot2 functions expect vectors that denote positions, widths, sizes, and so on. From its conceptual point of view, this is very similar to an HTML document; this is an empty space that is filled with different objects to which different characteristics are specified. The following example is the equivalent of
ggplot.graph <- ggplot(data=iris) ...