This is enables maximum flexibility wherein the analyst can create very complex charts using the “grammar of graphics”. Thus, the chart is built from the ground up by starting with data and progressively adding geoms, labels, coordinates / scales and other attributes to create a the final chart. Labels are added separately using the labs() function. The geom_line() function inherits the aesthetic arguments from the ggplot() function and produces a line on the chart. We set aesthetic arguments, x = date and y = close, to chart the closing price versus date. Alternatively, the aesthetic arguments can be applied to each geom individually, but typically this is minimized in practice because it duplicates code. When added inside the ggplot() function, the aesthetic arguments are available to all underlying layers. The primary features controlling the chart are the aesthetic arguments: these are used to add data to the chart by way of the aes() function. The workflow begins with the stock data, and uses the pipe operator ( %>%) to send to the ggplot() function. This is done using the geom_line from the ggplot2 package. Before we visualize bar charts and candlestick charts using the tidyquant geoms, let’s visualize stock prices with a simple line chart to get a sense of the “grammar of graphics” workflow.