ABSTRACT

This chapter introduces the base graphics system to construct some plots commonly used by fisheries scientists. The full extent of the graphing capabilities of R may be seen by searching the Internet for “R Graph Gallery” or “R Graph Catalog.” Scatterplots show the relationship between two quantitative variables. A fisheries scientist may want to construct a scatterplot with different symbols for different groups in the data. The underlying numeric codes for the factor levels are automatically used if a function or operator expects a numeric, but is given a factor vector. A line plot is superimposed onto a scatterplot by first creating the scatterplot as described and then adding the line to the active plot with lines. Histograms show the distribution of a quantitative variable and may be constructed with hist () from base R. Large data sets that have relatively discrete variables and little variability will often have considerable overplotting of points.