Skip to main content
Chemistry LibreTexts

3: Graphing

  • Page ID
    476866
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

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

    \( \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{\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}\)

    Ancillary Material

    Graph Paper (PDF of blank sheet with a graph grid that can be printed)

    Graph Paper (html that can be used with iPad)

    Learning Objectives

    Goals: 

    • Learn how to properly graph linear relationships
    • Learn how to use Vernier LabQuests

    By the end of this lab, students should be able to:

    • Calculate the slope and y-intercept for linear functions
    • Understand relationship of dependent and independent variables
    • Predict the value of a dependent variable if given the independent variable
    • Set up a Vernier LabQuest with probes

    Prior knowledge:

    • Use of Calculator

    Concurrent knowledge:

    Further reading:

     

    Safety

    • Emergency Preparedness
      • Eye protection is mandatory in this lab, and you should not wear shorts or open toed shoes. 
      • Do not do any work without an instructor present
    • Minimize Risk
      • Always use an outlet with a GFCI (Ground Fault Circuit Interupter) when using electronic equipment near water
      • Come to lab prepared
    • Recognize Hazards
      • Avoid getting water into electronics

     

    Equipment and materials needed

    Vernier Lab Quest 2 Vernier Temperature  Probes 600 mL Beaker
    Hot Tap Water Ice smaller beakers

     

    Functional Dependencies

    A graph can be used to show the relationship between two related values, the dependent and the independent variables.

    • Dependent Variable: A measurable variable whose value depends on the independent variable. Often represented by the algebraic symbol y.
    • Independent Variable: A measurable variable of which when changed, the value of the dependent variable changes. Often represented by the algebraic symbol x.

    \[y=\text{function of x} \\ or \\ y=f(x)\]

    Such a relationship would be the maximum amount of table salt (sodium chloride) you can dissolve in water as a function of temperature, which is represented by the data in table 1B.5.1. This represents a saturated solution, and what you notice is that if you raise the temperature of the water more table salt can dissolve. That is, if you have 26.1 g salt at 20.0 oC dissolved in 100 grams of water (which is the maximum amount that can dissolve in 100 grams of water), and add another 2 grams, it just falls to the bottom of the solution and the temperature does not change. If you then raise the temperature the solid at the bottom starts to dissolve and somewhere around 70 degrees all the salt dissolves. So the solubility is the dependent variable, and its value depends on the temperature, the independent variable. You noted in the above example that changing the dependent variable (solubility) had no effect on the temperature (independent variable).

    In this case Equation 1B.5.1 could be expressed as

    \[Solubility = f(Temperature)\]

    Data Measurement number Temperature (oC) Solubility (g NaCl/100 g water)
    1 0.00 35.2
    2 20.0 36.1
    3 40.0 37.0
    4 60.0 37.7
    5 80.0 38.4
    6 100.0 39.0
    Table \(\PageIndex{1}\): Solubility of table salt as a function of water. In this graph 6 measurements of the solubility were made at different temperatures. Here, the solubility is the maximum amount of salt that can be dissolved in 100 grams of water, and any extra salt beyond that falls to the bottom of the container as a precipitate (solid).

    A plot can then be made of the data where the dependent variable (y) is plotted on the vertical axis (ordinate axis) and the independent variable(x) is plotted on the horizontal axis. Figure 1B.5.1 represents a plot of the data from table 1B.5.1, where each point represents one of the data measurements, with the values typically expressed in terms of (x,y). So the third data point would have values of (60.0,37.0) representing the temperature and solubility.

    1b-5-1-plot.PNG
    Figure \(\PageIndex{1}\): Data from table 1B.5.1 plotted with temperature along the x-axis and solubility along the y Axis

    It should be noted that not all plots involve dependent and independent variables, and that sometimes both variables are dependent on another entity, which is not being plotted. This is the case for temperature conversions from Fahrenheit to Celsius, where both scales are measuring an intensive property, the temperature of some object or substance, and it is the temperature that changing. Or a plot of mass vs. volume for a pure incompressible substance, which are both extensive properties that depend on the amount of substance being measured.

     

    Graphing Linear Functions

    Equation 1B.5.3 is a linear equation \[y=mx+b\nonumber \]

    • m is called the slope of the line, which is the ratio of the change in y (the rise) to the change in x (the run). Since the line is linear, the slope is the same between any two points along the line.
    • b is called the y-intercept, which is the value of y when x=0.

    Steps for Graphing a Linear Function

    1. Pick your range and scale: In graphing a linear function the first step is to identify the range and scale for each axes. The range is defined by the minimum and maximum value along each of the axes. The scale is defined by the values of each line in the grid, which is used both to plot the data points, and once graphed, to read values from the graph. There are often minor and major marks given to the grid, where the major marks show the numerical value of that position.
    • Choosing the Range: There are two approaches. The first is to use the highest and lowest data value as the lower and upper bound of the range, although you may want the actual bounds to be some easy number to read, like a multiple of ten. The second approach is to look at the data, and see if the data is bounded by some real limit. For example, in the above data we are looking at the solubility of a salt in liquid water, so the temperature range may want to be defined by the temperature range where water is a liquid, even if your highest data point is not at the boiling point, and your lowest is not at the freezing point.
    • Choosing the Scale: Here you want the grid line to be easy to read. If possible, multiple's of 10 are very useful, but you need to look at the data. Want you want to avoid is where each mark is some hard to read value.
    1. Plot data: Mark each data point on the graph (like in Figure 1B.5.1, but do not write down the x,y coordinate values, just mark a point on the graph to indicate where there is a data value.
    2. Hand draw a best fit line that has an even distribution of points on both sides of the line. If the data is truly a linear function, there will be a random distribution of points along the line. Figure 1b.5.3 shows such a "best fit line".
      1b-5-2a-plot.PNG
      Figure \(\PageIndex{3}]): Best fit line that evenly describes the data. Not we do not connect the points, and some of the points are not on the line.
    3. Pick two points to calculate the slope from. Start at the left side and find the point on the line with the smallest values where the line crosses the grid lines, here it is point (0,25.50), and then starting at the right end pick the point with the highest values (96,39.00).
    • Note the precision is defined by both the data and the scale on the grid lines.
      • For the y-axis the precision is defined by the data, and although we have a mark every 0.1 values, so it looks like we could report solubility to the .01 value, the original data was only known to the 0.1 value (table 1B.5.1). So so even though the scale on the graph is more precise, we can only use that precision to read from the scale, and not report the value. That is from the scale we could read to a value of 35.30 and not 35.3, but we must use 35.3 in our calculation
      • For the x-axis the original data has a precision to the 0.1 digit, that is, we have values like 20.0 oC. But the smallest value on the minor grid axis is 4 oC, and so we have to "guess" between them to report the uncertainty, and thus choose the precision to be to the "ones" position.
    • Note, if we choose points near to each other, we can lose significant digits. For example, if the second point was (4,35.5) the change in temperature would be 4-0 or 4 degrees (1 significant digit), while using the value on the graph give 96-0, or 96 degrees, which has two significant Figures.
    • That is, we report all certain, and the first uncertain data point, as read off the graph. A graph scale should never have a smaller scale than the raw data, that is, it can't add to the precision
    1. Now calculate the slope

      \[\text{slope} = m=\frac{\text{rise}}{\text{run}} = \frac{\left( y_2 - y_1 \right)}{\left( x_2 - x_1 \right)} =\frac{\left( S_2 - S_1 \right)}{\left( T_2 - T_1 \right)} =\frac{\left( 39.0 -35.3 \right)}{\left( 96 - 0 \right)} = {\color{blue}0.039 \:\frac{g\; NaCl}{100gH_2O\cdot \; ^oC}}\]
       
    2. Now calculate the y intercept. Since the graph goes through zero, you can just read it from the graph
    • Since the x-axis includes zero, you can simply read it from the graph, b=35.3(gNaCl/100g water).

     

    Note

    If your graph does not include the zero point, you can extrapolate backwards from a given value.

    ​​​​We know that:

    \[m=\frac{\Delta{y}}{\Delta{x}} = \frac{\Delta{S}}{\Delta{T}} \]

    If we define S20=solubility when T=20, and S0=solubility when T=0, then b= S0, and S20 comes from the graph on Figure 1B.5.3 where, S20=36.1(gNaCl/100g water).

    \[{\color{blue}m}=\frac{\textcolor{red}{S_{20}}-S_{0}}{20-0}= \frac{\textcolor{red}{S_{20}}-b}{\Delta{T}_{(=20)}}\]

    Where \(\Delta{T_{(=20)}}\) means the value of \(\Delta T\)= 20,

    solving for b and including units in numerical calculation gives:

    \[b={\color{Red} S_{20}}-\textcolor{blue}{m}(\Delta{T}_{(=20)})={\color{red}36.1\left (\frac{g\; NaCl}{100gH_2O} \right )}- {\color{blue}0.039 \:\frac{g\; NaCl}{100gH_2O\cdot \; ^oC}}\left ( 20 \; ^oC\right )=35.3\left (\frac{g\; NaCl}{100gH_2O} \right )\]

     

    Experimental Procedures

    Go to Google Classroom and open the lab Experiment 3: Temperature and Graphing.  A copy is in the iframe below

    Interactive Element

     


    3: Graphing is shared under a not declared license and was authored, remixed, and/or curated by LibreTexts.

    • Was this article helpful?