concept geometry in category R

This is an excerpt from Manning's book Beyond Spreadsheets with R.
The general concept that this package encapsulates is that of a grammar, an explicit language that connects data (the first and foremost feature in a visualization) to what you see on the screen as aesthetic mappings. In a spreadsheet, you would perhaps select the values to have on the x-axis and y-axis, produce a plot, and then adjust colors and settings to achieve the plot you want. In
ggplot2, these settings are directly connected to the data through the mappings — for example, when plotting columns frommtcars, determining the color of points by whether or not the vehicle had an automatic transmission, as defined by corresponding values in the columnam. The other primary features ofggplot2are the types of features you want to plot (geometries) and the relationships between values within a group or aspect (scales).
Figure 9.5 Adding points as a geometry — with data, a mapping, and a geometry, you finally have some data plotted.
![]()