This lesson on Scatter Plots is hands-on and example-driven. You will construct scatter plots in Tableau to evaluate correlations and detect outliers between continuous measures. You will control mark granularity using the Detail shelf and encode additional analytical dimensions using Color, Size, Shape, opacity, and borders.
What You'll Be Able To Do
- Plot two continuous measures on Columns and Rows to create a two-dimensional coordinate space.
- Disaggregate aggregated marks across a dimension by placing a granular identifier on Detail.
- Encode a third numerical measure onto mark Size to represent volume or quantity per data point.
- Differentiate categories across data points using the Color and Shape marks cards.
- Format overlapping data points by adjusting Mark type to Circle, decreasing opacity, and applying borders.
Detailed Concept Walkthrough
1. Two-Dimensional Coordinate Setup
Scatter plots display the relationship between two continuous measures by mapping one to the horizontal axis and the other to the vertical axis. This reveals linear or non-linear correlation patterns and isolated outlier values.
- Mechanism: Dragging a continuous measure like Sales to Columns creates the horizontal X-axis, while dragging Profit to Rows builds the vertical Y-axis. Tableau automatically aggregates these fields to
SUM(Sales)andSUM(Profit)by default. - Under the Hood: In its initial state with only two aggregated measures, Tableau renders a single mark representing the grand total coordinates across the entire data source.
- Best Practice: Always verify that both axes represent numeric, continuous fields (
green pills) rather than discrete categories to ensure a continuous Cartesian space.
// Tableau Shelf Placement for Base Scatter Coordinates:
Columns: [Sales] // Continuous measure (X-axis)
Rows: [Profit] // Continuous measure (Y-axis)
Marks: Automatic // Renders single point at SUM(Sales), SUM(Profit)
Key Takeaway: Placing two continuous measures on Columns and Rows sets up the 2D Cartesian plane for correlation analysis.
2. Granularity via Detail Shelf
The Detail shelf determines the level of aggregation (granularity) of the visualization without altering the visual mark type or Cartesian axes. It fractures aggregated marks into individual dimension members.
- Mechanism: Placing a discrete dimension such as Customer ID on the Detail card breaks the single aggregated coordinate into one distinct mark for every customer in the dataset.
- Under the Hood: Tableau generates a
GROUP BYquery including the dimension on Detail, calculatingSUM(Sales)andSUM(Profit)for each distinctCustomer IDrecord. - Execution Flow: Once unbundled, data points scatter across the plane, allowing immediate visual detection of outliers (isolated points) and general correlation trajectories.
// Adding granularity to scatter plot:
Columns: [Sales]
Rows: [Profit]
Marks Card -> Detail: [Customer ID] // Disaggregates data to customer-level marks
Key Takeaway: The Detail shelf controls mark disaggregation without adding axes or visual encodings.
3. Multi-Attribute Visual Encoding
Marks cards allow multi-dimensional analysis on a single scatter plot by binding additional measures or dimensions to Size, Color, and Shape.
- Mechanism: Dragging a continuous measure like order count (
CNT(Orders)) to Size scales individual marks based on transaction volume. Dragging a discrete dimension like Country to Color and Shape assigns distinct hues and glyphs per country. - Under the Hood: Tableau applies a secondary legend mapping for each encoding, mapping quantitative values to pixel radii and categorical values to palette indexes.
- Best Practice: When mapping categories to Shape, avoid exceeding 7-10 distinct values to prevent visual clutter and indistinguishable symbols.
// Multi-attribute encoding configuration:
Marks Card -> Size: [CNT(Orders)] // Sizes circles by order volume
Marks Card -> Color: [Country] // Colors circles by categorical country
Marks Card -> Shape: [Country] // Assigns distinct shapes per country
Key Takeaway: Layering measures on Size and dimensions on Color or Shape embeds multi-variable insights into a single 2D plane.
4. Overplotting and Mark Styling
High-density scatter plots suffer from overplotting where overlapping marks obscure point density. Changing mark types, lowering opacity, and adding borders clarifies mark distribution.
- Mechanism: Changing the Marks dropdown from Shape/Automatic to
Circleproduces solid filled marks. Clicking the Color card exposes both the Opacity slider and the Border styling options. - Execution Flow: Lowering opacity causes overlapping circles to visually blend into darker, more saturated regions, instantly revealing local data point density.
- Best Practice: Apply a subtle gray or dark border around filled circles so adjacent and overlapping transparent marks retain distinct geometric perimeters.
// Styling marks for high-density readability:
Marks Dropdown -> Select 'Circle'
Marks Card -> Color -> Opacity: 60%
Marks Card -> Color -> Effects -> Border: Select 'Gray'
Key Takeaway: Filled circles combined with reduced opacity and perimeter borders resolve mark occlusion in dense scatter plots.
Topics Covered in Scatter Plots
- Scatter Plot Core Purpose (0:00 - 0:25) — The instructor outlines scatter plots as tools for identifying correlations and outliers between two continuous measures.
- Building the Base Axis (0:25 - 0:52) — Sales and Profit are dragged to Columns and Rows to create continuous horizontal and vertical axes.
- Disaggregating via Detail (0:52 - 1:14) — Customer ID is dropped onto the Detail shelf to unbundle grand totals into individual customer marks.
- Adding Size Encoding (1:14 - 1:35) — Order count is mapped onto the Size shelf so circle diameters reflect customer purchase volumes.
- Color and Shape Mapping (1:35 - 1:55) — Country is placed on Color and Shape to categorize marks using hues and distinct glyphs.
- Formatting Density and Borders (1:55 - 2:35) — Marks are changed to filled circles with reduced opacity and gray borders to clarify overlapping data.
Reference Cheat Sheet
-
Columns / Rows Shelves— Establishes X and Y coordinates for continuous correlationColumns: [Sales] | Rows: [Profit] -
Marks -> Detail— Splits aggregated measures into distinct marks per dimension memberMarks -> Detail: [Customer ID] -
Marks -> Size— Scales mark radius proportionally to a quantitative measureMarks -> Size: [CNT(Orders)] -
Marks -> Color— Applies categorical hues or continuous gradients to marksMarks -> Color: [Country] -
Marks -> Shape— Assigns distinct geometric glyphs to categorical dimension membersMarks -> Shape: [Country] -
Marks Dropdown -> Circle— Converts default marks into uniform filled circlesMarks: Circle -
Color -> Opacity & Border— Reduces fill opacity and adds contrasting mark bordersColor -> Opacity: 65% | Border: #808080
Comparison Table
| Shelf / Property | Data Type Accepted | Visual / Structural Impact |
|---|---|---|
| Columns & Rows | Continuous Measures | Defines 2D Cartesian axes coordinates |
| Detail Shelf | Discrete Dimensions | Disaggregates marks without visual styling |
| Size Shelf | Continuous Measures | Varies circle diameter by value |
| Color Shelf | Measures or Dimensions | Applies palette gradients or categories |
| Shape Shelf | Discrete Dimensions | Replaces circle with custom glyphs |
| Color -> Opacity | Slider (0% - 100%) | Shows mark density in overlaps |
Common Pitfalls
- Mistake: Leaving continuous measures on Columns and Rows without adding a dimension to Detail. Avoid: Add a granular identifier like Customer ID to Detail to disaggregate the single summary mark.
- Mistake: Retaining 100% opacity on dense scatter plots with overlapping points. Avoid: Lower opacity in the Color menu so clustered marks darken and reveal point density.
- Mistake: Using unfilled default shapes for dense data points. Avoid: Switch the Marks dropdown to Circle and enable a perimeter border under Color effects.
FAQs
- Why does Tableau show only one point when I add Sales to Columns and Profit to Rows?
Tableau aggregates all rows into grand totals by default (
SUM). Adding a dimension to the Detail shelf disaggregates the view into individual marks. - What is the primary analytical purpose of a scatter plot? Scatter plots identify correlations (positive, negative, non-linear) between two continuous measures and locate isolated outlier data points.
- How do opacity and borders help with overlapping marks? Lower opacity creates darker shading where points overlap to show density, while borders keep individual mark boundaries discernible.
- Can I encode both Color and Shape using the same dimension? Yes, dropping a dimension onto Color and Shape simultaneously provides redundant encoding, making categories easier to identify across the chart.