# Fitting a line to a scatter plot in Matplotlib

In this article we see how to fit a straight line to the data in a scatter plot.

As a simple example of a scatter plot, for a group of people we might record their height and their shoe size. A scatter plot would then consist of one dot for each person, indicating their height (x) and shoe size (y).