Introduction
In this lesson, you will learn how to plot values for a function. You will also learn the difference between discrete and continuous data and how to show each type on a graph.
These videos illustrate the lesson material below. Watching the videos is optional.
- Plot Values from a Function (04:56 mins) | Transcript
- Discrete and Continuous Data and Graphs (04:40 mins) | Transcript
Plot Values from a Function
A function is a set of rules so that for every input, you get only one output. Functions are represented in math as equations with two variables: x and y. The x is the input and y is the output. For every x you plug into the equation, you only get one y.
You can represent functions on a graph using the coordinate plane with the coordinates being x (the input) and y (the output). The point is written like this: (x, y). The functions in this lesson create a pattern of points that make a line.
Example 1
Plot values from this function: \( y=\frac{1}{2}x\).
First, start inputting values for x and solving for y. You can substitute any value for x that makes sense, but it is often easiest to start with 1. Make a column for x values and a column for y values.

Figure 1
\begin{align*} y &=\frac{1}{2} (1) &\color{navy}\small\text{Substitute x =1}\\\ y &=\frac{1}{2} &\color{navy}\small\text{Simplify for the value of y} \end{align*}
So, the first point is (1, \(\frac{1}{2}\)). Figure 2 shows where it is plotted:

Figure 2
Find another point by using 0 for x. If you plot a point where x is 0, you will discover where the function, or line, crosses the y-axis.
\begin{align*} y &=\frac{1}{2} (0) &\color{navy}\small\text{Substitute x =0}\\\ y &=0 &\color{navy}\small\text{Simplify for the value of y} \end{align*}
The next point is (0,0), which is the origin.

Figure 3
For the next x value, use -1.
\begin{align*} y &=\frac{1}{2} (-1) &\color{navy}\small\text{Substitute x =-1}\\\ y &=-\frac{1}{2} &\color{navy}\small\text{Simplify for the value of y} \end{align*}
The next point \((-1, -\frac{1}{2})\). It is plotted in Figure 4.

Figure 4
Now that you have plotted a few points, you can see that \( y=\frac{1}{2}x\) creates a pattern. You only need 2 points to determine a line but it is helpful to have a third point to make sure the graph is a straight line.

Figure 5
You can check points on the line to make sure it follows the pattern. For example, looking at the line, it appears that when x is 4, y is 2:
\begin{align*} y &=\frac{1}{2} (4) &\color{navy}\small\text{Substitute x =4}\\\\\ y &= 2 &\color{navy}\small\text{Simplify for the value of y} \end{align*}
The point (4, 2) is correct.
Based on this equation, the line will continue off into infinity in both directions, so there are an infinite number of points on this line.

Figure 6
Discrete and Continuous Data and Graphs
Sometimes you plot points that don’t make a perfect pattern or that have no values in between. This is called discrete data and you don’t connect the dots with a line.
- Discrete data is a set of data where the points are separate and distinct. A scatter plot is an example of discrete data. It is a specific set of data with things that cannot be measured continuously, meaning it contains whole numbers.
An example of discrete data is the number of people in a school; it must be a whole number because you don’t have a fraction of a person. Other examples of discrete data include the number of horses in a barn or the amount of inventory in a store. If the store sells books, then the number of books is discrete data because you can only count the number of books as whole numbers.
Example 2
The chart below displays the number of students in a school based on the date. Graph the data.
Date | Number of Students |
1-Feb | 55 |
2-Feb | 54 |
3-Feb | 59 |
4-Feb | 62 |
5-Feb | 53 |

Figure 7
This data can be graphed using a scatterplot because the points are distinct. The attendance at the school is specific to the day, and there are no values between where you might have fractions of a student, so this is discrete data.
When you plot some points from a function and then connect those points with a line, you are demonstrating continuous data. If you were to choose any number between the points you plotted, the equation’s output would be on the line because of the pattern the function makes.
- Continuous data is a set of data that can be measured continuously. Even though there may be specific points in the data, there is also additional and infinite data between those points.
Temperature is an example of continuous data. If you take the temperature between Minute 1 and Minute 2 and compare them, the temperatures may be different, but the temperature didn’t jump directly from one point to the other. The temperature gradually increased (or decreased) from one temperature to another. The same is true with a car. The speed of a car gradually speeds up or slows down. It doesn’t jump from 10 miles an hour to 20 miles an hour. There’s a continuous increase in speed between the two points.
Example 3
The chart below displays the time in seconds it takes a car to reach a certain speed. Graph the data.
Time in Seconds | Speed |
0 | 0 |
1 | 5 |
2 | 11 |
3 | 18 |
4 | 26 |
5 | 35 |
6 | 45 |
7 | 56 |
8 | 68 |
9 | 69 |
10 | 70 |

Figure 8
To graph a continuous function, use a line between the dots. On the graph, you see that the car continues to get faster and faster with each second, but in between each of these seconds there is an infinite number of other speeds corresponding to fractions of a second, which makes this continuous data. You could measure in smaller and smaller fractions of a second and still find the speed that the car was going at the time the measurement was taken.
Things to Remember
- A function is an equation where every x input has only one y output.
- Discrete data is a set of data where the points are separate and distinct.
- It is data that can be counted.
- On a graph, points are not connected. An example is a scatter plot graph.
- Continuous data is a set of data that can be measured continuously.
- It is data that can be measured.
- On a graph, points are connected.
Practice Problems
1. Is the graph below discrete or continuous?3. A chicken breeder sells pullets (young hens that have just started laying eggs) for \($25\) each. The breeder charges an additional \($100\) to deliver the animals, regardless of the number purchased. If you let P represent the number of pullets sold, then you can represent the total cost (T) as \(T = 100 + 25P\). Create a graph that illustrates the relationship between P and T, assuming that the number of pullets purchased is between 1 and 8.
(Hint: Use the equation for the total cost. Create a table with input values from 1 to 8, and calculate the outputs to find the coordinates that you need to graph.) (