---
schema_version: "1"
id: b47f4917c9470700282552449b736dc846b1f667e78f853c120d5a0d94155a96
title: Build a Scatter Plot
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/pro/desktop/buildexamples_scatter.md
canonical_url: https://help.tableau.com/v0.0/pro/desktop/en-us/buildexamples_scatter.htm
source_site: help.tableau.com
content_type: documentation
content_hash: b979af167b0b8a1c2ba6e73169848d6d529c8082e2d44fe5becdaf4515aa1005
description: Build a scatter plot to visualize relationships between numerical measures.
---
[Skip to main content](#main-content)

# Build a Scatter Plot

Use scatter plots to visualize relationships between numerical variables.

In Tableau, you create a scatter plot by placing at least one measure on the Columns shelf and at least one measure on the Rows shelf. If these shelves contain both dimensions and measures, Tableau places the measures as the innermost fields, which means that measures are always to the right of any dimensions that you have also placed on these shelves. The word "innermost" in this case refers to the table structure.

<table align="center" style="margin-left: 0;margin-right: auto;" class="table--plain">
                    <colgroup><col>
                    <col>
                    </colgroup><tbody>
                        <tr>
                            <td><b>Creates Simple Scatter Plot</b>
                            </td>
                            <td><b>Creates Matrix of Scatter Plots</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="https://help.tableau.com/v0.0/pro/desktop/en-us/Img/dataview_examples_scatter1a.png" alt="Sum of sales measure on the Columns shelf and sum of profits measure on the Rows shelf.">
                            </td>
                            <td>
                                <img src="https://help.tableau.com/v0.0/pro/desktop/en-us/Img/dataview_examples_scatter1b.png" alt="Region and sum of sales measures on the Columns shelf and category and sum of profits measures on the Rows shelf.">
                            </td>
                        </tr>
                    </tbody>
                </table>

A scatter plot can use several mark types. By default, Tableau uses the shape mark type. Depending on your data, you might want to use another mark type, such as a circle or a square. For more information, see [Change the Type of Mark in the View](https://help.tableau.com/v0.0/pro/desktop/en-us/viewparts_marks_marktypes.htm).

To use scatter plots and trend lines to compare sales to profit, follow these steps:

1. Open the Sample - Superstore data source (if necessary, you can download it from the [Tableau Public sample data page](https://public.tableau.com/app/learn/sample-data)).
2. Drag the Sales measure to Columns.
    
    Tableau aggregates the measure as a sum and creates a horizontal axis.
3. Drag the Profitmeasure to Rows.
    
    Tableau aggregates the measure as a sum and creates a vertical axis.
    
    Measures can consist of continuous numerical data. When you plot one number against another, you are comparing two numbers; the resulting chart is analogous to a Cartesian chart, with x and y coordinates.
    
    Now you have a one-mark scatter plot:
    
    ![A scatter plot displaying the sum of sales and profit with one mark.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_16.png)
4. Drag the Category dimension to Color on the Marks card.
    
    This separates the data into three marks—one for each dimension member—and encodes the marks using color.
    
    ![A scatter plot displaying the sum of sales and profit with three marks.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_18.png)
5. Drag the Region dimension to Detail on the Marks card.
    
    Now there are many more marks in the view. The number of marks is equal to the number of distinct regions in the data source multiplied by the number of categories. (If you're curious, use the Undo button on the toolbar to see what happens if you drop the Region dimension on **Shape** instead of Detail.)
    
    ![A scatter plot of sales and profit by product category.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_19.png)
6. To add trend lines, from the Analytics pane, drag the Trend Line model to the view, and then drop it on the model type.
    
    ![Process of adding a linear trend line on a scatter plot.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_22.png)
    
    A trend line can provide a statistical definition of the relationship between two numerical values. To add trend lines to a view, both axes must contain a field that can be interpreted as a number—by definition, that is always the case with a scatter plot.
    
    Tableau adds three linear trend lines—one for each color that you are using to distinguish the three categories.
    
    ![A scatter plot of sales and profit by product category with trend lines.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_20.png)
7. Hover the cursor over the trend lines to see statistical information about the model that was used to create the line:
    
    ![A tooltip on a scatterplot with trend lines.](/tableau/next/en-us/pro/desktop/en-us/Img/scatter_21.png)
    
    For more information, see [Assess Trend Line Significance](https://help.tableau.com/v0.0/pro/desktop/en-us/trendlines_add.htm#significance). You can also customize the trend line to use a different model type or to include confidence bands. For more information, see [Add Trend Lines to a Visualization](https://help.tableau.com/v0.0/pro/desktop/en-us/trendlines_add.htm).
    
    ### See Also
    
    [Example: Scatter Plots, Aggregation, and Granularity](https://help.tableau.com/v0.0/pro/desktop/en-us/calculations_aggregation.htm#ExampleScatter)