Tables

With tables, you can organize ordered pairs, quickly plot points for a particular function, or even run a regression to find a line or curve of best fit. Accessing the table settings from the circle icon at the top of each column allows you to tweak more than just the color: adjust the style (dots, connected, or both) or convert the entire table into movable points with just a click! Get started with the video on the right, then dive deeper with the resources and challenges below.

Example of plotting points on a graph using a table and connecting the points.  Example of converting a function to a table. GIF

Tables in 2D

Getting Started with Tables

To get started with a blank table, open the Add Item menu and choose Table. You can also type table

Add Item menu with the table option selected. Screenshot.

Enter values into the table and use the arrow keys to easily maneuver through the table. By default, the first two columns of a new table will be plotted (\(x_1\), \(y_1\)). Click on the zoom fit icon, which appears as a magnifying glass in the bottom left of the expression line, to automatically adjust the axis settings to fit the data.

Zoom fit option shown to fit the graph to the viewing window. Screenshot.

Scatter Plots

You can also input data from another source directly into Desmos. From a spreadsheet (such as Excel or Google Sheets), “copy” the table columns that you want to use, and then “paste” directly into a blank expression list and Desmos will automatically generate a table.

Note: The column header titles will not transfer and there is a maximum of 1000 rows that are able to be copy and pasted in a table. Copying and pasting more than 1000 rows will generate more than one table.

Scatter plot. Screenshot.

Regressions

alt.

Once your data is in a table, create a regression by clicking the Add Regression icon to the left of your expression or open the options menu next to your \(y\) variable and press the Add Regression icon. This will automatically add a Linear Regression below your table.

animation showing the list of regression options in the regression dropdown menu.

Click on Linear Regression to open the dropdown menu and choose the model that best fits your data.

If you have multiple data columns for the same independent variable, a second dropdown will let you select which column to use in your model.

Image showing an regression in an expression line.

You can create a custom regression model by using the tilde symbol (~) instead of the equals sign (=) in a new line. Reference your table's column names to include the data in your model.

For more details on how Desmos performs regressions and options to select the best regression model, check out our article on Regressions.

Function Tables

Columns of tables have different behavior depending on their headings. If you put a function of \(x\) in the 2nd header, the values will be automatically calculated using the values in the 1st column. For example, if you have \(x_1\) and \(sin (x_1)\) as your headings, we'll fill in the 2nd column for any value you put in the first.

Image of a table with intervals of pi. Screenshot.

You can write rich math expressions in the cells, including things like \(\frac{\pi}{2}\).

Image of a table with sin (x) and cos(x). Screenshot.

Tables can also help you compare two functions side by side by adding another column and entering another function into the new heading.

Image of a table with Expression line 1:f\left(x\right)=-2x+1 . Expression line 2: a table with f(x_1). Screenshot.

You can define a function in an expression line and use function notation in your table to evaluate based on your input values.

Create a Table from a Function

Expressions, coordinate points, equations, and functions can be converted to tables using Create Table. To start, click the Edit List button. If the expression line contains an available expression, a Create Table button will appear. Click on it to add a table of values that match the expression line.

Sequence of a linear function with Edit List called out.  Then Create Table called out. Then a table made with five values from the function.

 

Equations, expressions, points, and lists of points can be converted to a table.

Single Point

Point converted to a table. Screenshot.

List of Points

List of points converted to a table. Screenshot.

Function Notation

Function converted to a table. screenshot.

 

Note: The Convert to Table option isn't available for implicit expressions, parametric, and polar graphs.

 

Externally Define Columns in a Table

You can externally define any column in a table (including the first column) by referencing any list of values in the column header. Select the image to change values in list L and watch how the table changes.

Image of a table where the first column is defined by a separate list 'L'. Screenshot.

Computed Cells

If a column header contains a calculation, the column will fill in with the computed values.

Any cell that contains a computed value can’t be edited, so it will show with a gray background.

For example, you can calculate the dependent column to be 2 times the values in the \(x_1\) column.

Image showing a computed cell in the dependent column of the table.

Plotting Points from a Table in the 3D Tool

In 3D, points do not automatically plot from a table. To plot points from a table, on a new line in the expression list type the header values of your table as coordinates, such as \((x_1,y_1,z_1)\). Explore more by clicking on the graph.

Table values in the 3D tool plotted using (x_1,y_1,z_1) in the second expression line. Screenshot.

Learn More

Please write in with any questions or feedback to support@desmos.com.