The R graphics package—base
The inbuilt R graphics package, better known as the base plotting system, is the first address to start building a plot as it is the default method for plotting data. The graphics
package, which provides the base plotting functions and the grDevices
package, which includes the code to call the different system devices, are basically building the base plotting system.
The plot creation process can be divided into two phases.
- The initialization of a new plot.
- The extension of an existing plot.
The function, plot()
, calls a graphic device and draws the data as a plot to the device. This plot function includes several basic graph types along with many arguments to annotate the plot. Furthermore, by using a very large number of different parameters, you can easily customize the created graph types.
Creating base plots
For the next plot, we are using the inbuilt, library(datasets)
, and the JohnsonJohnson
dataset, which represents the quarterly earnings per Johnson...