It is a graphic package implemented in R, it allows to make graphs in a very flexible way because it contains many different commands to perform specific functions when creating and manipulating graphs. In addition, this graphic package has an underlying grammar in layers, so that it is composed of independent components. These independent components can be combined in many different ways to make or modify the graphs. Each graph is made up of a few equal components: data, visual marks that represent data points (geoms), and a coordinate system. The necessary variables for the ggplot command are the data to use in data frame format and know which variables we will use as x and y: ggplot (df, aes (x, y, )) You can add more layers to the previous ggplot using the + operator, so the code is explicit as to which layers were added and in the order they were added. here we will use the dataset iris : head ( iris ) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Spe