GGplot2/Plotnine
GGplot/GGplot2 is focused on making the creation of data visualizations intuitive and straightforward. GGplot uses a certain plotting standard that ensures that all plots are comprised of the same basic elements. This plotting format is called the “Grammar of Graphics” standard, and it is adapted from R. The advantage of this consistent plotting standard helps ensure that the code used to render the graphs are uniform and easy to interpret.
In this lesson, we’ll cover the most notable features of GGplot, learn the process of creating plots with GGplot, and then explore some of the different types of visualizations we can create with GGplot.
GGplot makes use of the “Grammar of Graphics” plotting style. The concept behind the Grammar of Graphics is that there are different layers or attributes that comprise every plot, and that these layers have consistent names that can easily be referenced, created, and updated.
GGplot also allows you to easily create subsets or facets of data and then visualize these facets on the same plot, all with relatively little code. This aids in exploratory data analysis.
The Grammar of Graphics
Before we delve into how to create plots with GGplot, we should take some time to understand the Grammar of Graphics plotting style. The plotting style is comprised of several different components. You can think of the different plot components as layers that build on top of one another to create the entire visualization.