11.2 Plotting arguments
Most plotting functions have tons of optional arguments (also called parameters) that you can use to customize virtually everything in a plot. To see all of them, look at the help menu for par
by executing ?par
. However, the good news is that you don’t need to specify all possible parameters you create a plot. Instead, there are only a few critical arguments that you must specify - usually one or two vectors of data. For any optional arguments that you do not specify, R will use either a default value, or choose a value that makes sense based on the data you specify.
In the following examples, I will to cover the main plotting parameters for each plotting type. However, the best way to learn what you can, and can’t, do with plots, is to try to create them yourself!
I think the best way to learn how to create plots is to see some examples. Let’s start with the main high-level plotting functions.