© Margot Tollefson 2021
M. TollefsonVisualizing Data in R 4https://doi.org/10.1007/978-1-4842-6831-5_2

2. The plot( ) Function

Margot Tollefson1  
(1)
Stratford, IA, USA
 

The plot() function in R creates a graphic from objects of specific R classes. A figure resulting from a call to plot() can contain text, lines, points, and/or images, and the areas of the graphic can be filled by colors or patterns. The kind of graphic displayed depends on the class of the object(s) to be displayed. For example, a single time series (an object of class ts) gives a line plot that is plotted over time.

2.1 Arguments and Default Values

By default, a graphic usually has black lines and text – with preset line, point, and text sizes and weights. Arguments that change the ...

Get Visualizing Data in R 4: Graphics Using the base, graphics, stats, and ggplot2 Packages now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.