# 15. Line graphs¶

Like scatter plots, line graphs are useful for visualizing the relationship between two numerical variables. Unlike scatter plots, however, line graphs assume that for any given “x” value, there is a unique “y” value. We often use line graphs for visualizing how a numerical variable changes over time.

Line graphs are constructed similarly to scatter plots. We start by choosing “x” and “y” variables and plot each (x, y) pair as a point. We then draw line segments between each consecutive pair of points when ordered by their “x” values. The straight line segments have the effect of emphasizing the trend in “y” as “x” increases.

On the other hand, if we wished to downplay the change in temperature over the last century, we might change the y-axis so that it starts at zero and ends at 100. This “fixes” the issue with the line doubling in height, but it has the effect of obscuring the warming trend. We can see this by re-creating the plot above, this time with `ylim=(0, 100)`, which makes the lower and upper limits of the y-axis 0 degrees and 100 degrees, respectively.
```average_temperatures_by_year.plot(kind='line', y='temperature', ylim=(0, 100));