Informatics Practices · Ch 4 — Plotting Data using Matplotlib
Introduction
Introduction
We have already seen how to organise and analyse data using Pandas and NumPy. But analysis alone is not always enough. When you look at a table of numbers, patterns can be hard to spot. That is where visualisation comes in.
Data visualisation means representing data graphically — through graphs, charts, and other pictorial forms. The purpose of plotting data is to make variation visible or to show relationships between variables. As M. McIntyre put it, “Human visual perception is the most powerful of data interfaces between computers and Humans.”
Visualisation helps in two main ways. First, it helps us understand the results of our analysis better. Second, it helps us communicate those results effectively to others — whether that is a manager, a client, or the general public.
You encounter visualisations every day without thinking about it. Traffic symbols, ultrasound reports, an atlas of maps, the speedometer in a vehicle, the tuner on a musical instrument — all of these are examples of visualisation. In professional fields like health, finance, science, mathematics, and engineering, data visualisation is used extensively to make sense of complex information.
In this chapter, we will learn how to use the Matplotlib library in Python to create visualisations. Specifically, we will cover line charts, bar charts, and scatter plots, and see how to apply them to different types of data.