Scatter plot
Scatter plot for the relationship between two continuous variables.
Use a scatter plot to show how two continuous variables relate, optionally split by a category.
Latency vs throughput by region
euus
This chart cannot be displayed here: it needs JavaScript and WebGL.
The same chart in each style
Source
```chart
type: scatter
title: Latency vs throughput by region
data:
inline:
- { region: eu, rps: 820, p95_ms: 180 }
- { region: eu, rps: 1240, p95_ms: 215 }
- { region: eu, rps: 1680, p95_ms: 258 }
- { region: us, rps: 980, p95_ms: 155 }
- { region: us, rps: 1510, p95_ms: 198 }
- { region: us, rps: 2050, p95_ms: 232 }
encoding: { x: rps, y: p95_ms, color: region }
```
Fields that matter
type: scatterwithencoding.xandencoding.yas the two numeric fieldsencoding.coloradds a categorical dimensionencoding.sizemakes bubble area proportional to a nonnegative valueencoding.labelnames points; top-levelhighlightprioritizes values ofhighlight.bythroughincludeand optionalpriorityaxes.xandaxes.ysetlabel,formatandunitstyle.ratiodefaults to 4:3 for scatter
Interactions
- Hover, tap or focus a point to read its values; the point grows slightly.
- Click a legend entry to toggle a group when the chart has several.
- Every observation stays in the readouts and the Table view even when its label is hidden.
- Download PNG or CSV, or Expand the chart.