5 Introduction

This course and all associated material were written using Python 3.6.

5.1 Graphics in Python

There are a host of popular packages for graphics in Python as it relates to data analysis.

5.1.1 Matplotlib

Matplotlib is probably the most widely used graphics package in Python. It is a huge library which provides a diverse range of tools for creating graphics in a variety of contexts. One of it’s downsides is that the default look and feel of graphics is not particularly attractive and modifying your plots beyond something relatively basic is non-trivial.

5.1.2 Seaborn

A popular library among data analysts. It provides some nice wrappers for common tasks in matplotlib and improves on the default look and feel. It is worth a look for quick generation of common statistical plots but since it is built on top of matplotlib it can become tricky to do things that are outside of the realm of the pre-existing functions.

5.1.3 plotnine

plotnine is an implementation of the Grammar of Graphics in Python based on the very popular R package ggplot2.

5.1.4 plotly

Plotly’s Python graphing library makes interactive, publication quality graphics. It allows both quick experimentation with plots and fully customisable control. Plotly can be installed using pip

pip install plotly