Plotting time series using the ggplot library for Python

The ggplot2 library for the R programming language provides a facet_wrap function which is useful for visualising complex data sets. The following plots show mean monthly nitrogen dioxide levels from 2007 to 2016 for various cities:


As stated in the documentation for the Python ggplot library, ‘R is a little weird’. Fortunately, this library enables useful ggplot2 features to be used in Python. The following code gives a very similar output to the above:


Leave a Reply