Skip to main content
Statistics LibreTexts

11.4: Line Graphs

  • Page ID
    64751

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Line graphs can be used to represent a trend in observations with respect to a variable that has at least an ordinal measurement scale. For this chapter we will consider the special case of examples of plotting a trend of an observation that changes with respect to time. For example, you might be interested in visualizing whether there are any trends in the population of a village over a period of many years. Figure \(\PageIndex{1}\) shows the population of the village of Creston, IL from 1880 to 2020. The populations were taken from the United States Decennial Census, and therefore data is only available every ten years. In considering the plot in Figure 11.8, we can observe that the population was stable between 1880 and 1950, with a small dip during World War II. After that, the population increased and has somewhat stabilized once more. Note that the horizontal axis corresponds to time, in this case the years from 1880 to 2020. The vertical axis corresponds to the size of the population. The plot was constructed by plotting the population against each year and then connecting these points with lines.

    clipboard_e718ad6a6e0cd687f36de6dc0f4033241.png
    Figure \(\PageIndex{1}\): The population of Creston, IL based on the U.S. Decennial Census from 1880 to 2020 (Public domain image created by Alan M. Polansky).
    Definition: Line Graph

    A line graph is a plot of points whose horizontal axis is a variable that has at least an ordinal measurement scale and whose vertical axis is an observation or measurement that has at least an ordinal measurement scale. The points are connected by line segments with respect to the order of the horizontal axis.

    Line graphs can also be constructed to have more than one variable plotted on the vertical axis, which allows one to compare the trends of two or more variables that have been measured over the same time. Usually, the variables plotted against time are measured with the same units of measurement, otherwise the plot can become difficult to interpret. For example, consider the line graph shown in Figure \(\PageIndex{2}\). This plot shows a measure of the number of times the phrases “same-sex marriage” and “United States Supreme Court” are searched for in the 40 months starting at February 2012 (Flores and Barclay 2016). It was during this time that two very important issues were to be decided by the United States supreme court: the Affordable Care Act, which would guarantee universal access to health care, and the issue of marriage equality, which considered whether same sex couples had the right to be married. Certain time points have also been highlighted on the plot. The first vertical line, which is a green dashed line, indicates when President Obama announced his support for same-sex marriage, and at that time there is a spike in searches for that topic. The vertical dashed purple line indicates when the Affordable Care Act was upheld by the United States Supreme Court, and prior to that time there is a large spike in the number of searches for the phrase “supreme court” in anticipation of the ruling. The vertical teal line indicates when oral arguments for same-sex marriage were argued before the Supreme Court, and we can observe that both phrases have a spike in the number of searches at that time. Finally, the vertical red dashed line indicates when the final ruling on same sex marriage was announced, and again we can observe a spike for both phrases at that time. After that time, searches for both phrases decline and stabilize.

    clipboard_e2a1227655fd3df185c4f7b868309e454.png
    Figure \(\PageIndex{2}\): Line graph of National trends in Google information searching on “same-sex marriage” (blue) and “United States Supreme Court” (red). The green dashed line indicates when President Obama announced support for same sex marriage. The purple dashed line indicates when the Affordable Care Act was upheld by the Supreme Court. The teal dashed line indicates when oral arguments were heard on same sex marriage, and the red dashed line indicates when the final court ruling was announced. The first month indicated on the plot corresponds to February 2012. The plot is adapted from information contained in (Flores and Barclay 2016). (Public domain image created by Alan M. Polansky).

    Figure \(\PageIndex{3}\) exhibits another example of a line graph that shows trends for multiple variables. In this graph we have plotted the median income for individuals of employable age for different racial groups based on data from Wilson (2020). The horizontal axis indicates yearly data from 2000 to 2020. A first glance shows that there is a difference between the median incomes for different races, and that this difference is consistent throughout the years with Asian individuals having the highest median income followed by white individuals. African American and Hispanic individuals have the lowest median incomes, and the two are comparable. We can also observe how the median incomes change over time. For white, African American, and Hispanic individuals, the median income is stable, and perhaps slightly decreasing until around 2014 when they begin to increase. The trend for Asian individuals is somewhat different. The median income for Asian individuals increases and peaks around 2005 and then has a decrease, followed by an increase starting around 2015. We can observe from the plot that the relative increase is greater for Asian individuals near the end of the graph.

    clipboard_e54f4b6b62931933911688a35e58dc57d.png
    Figure \(\PageIndex{3}\): Line graph of income by race from 2000–2019 based on data obtained from Wilson (2020) (Public domain image created by Alan M. Polansky)

    Importantly, notice in Figure \(\PageIndex{3}\) is that the horizontal axis does not start at zero but at $20,000. The effect of this plot decision is to emphasize the differences between the median incomes of the racial groups. While it is not uncommon for plots of this type not to start an axis at zero, one should be aware that using different ranges for the axes can influence how differences and trends are perceived in the graph. Figure \(\PageIndex{4}\) shows the same data, but the vertical axis now starts at $0 instead of $20,000 and ends at $200,000 instead of $120,000. Note that the trends in the graph have been flattened out, so the differences between the lines appear less significant that in Figure \(\PageIndex{3}\).

    clipboard_edb42aacdf907667bfa3f95cd80c1191b.png
    Figure \(\PageIndex{4}\): Line graph of income by race from 2000–2019 based on data obtained from Wilson (2020) using an expanded vertical axis (Public domain image created by Alan M. Polansky)

    This page titled 11.4: Line Graphs is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by .

    • Was this article helpful?