> For the complete documentation index, see [llms.txt](https://docs.chartsql.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chartsql.com/charts/scatter.md).

# Scatter

Scatter charts show the relationship between two numerical variables

<table data-card-size="large" data-view="cards"><thead><tr><th data-card-target data-type="content-ref"></th><th data-hidden></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/charts/scatter.md#auto-scatter">Scatter</a></td><td></td><td></td><td></td><td><a href="https://4045370218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB0xzzR5x0BnQ6kHixlzd%2Fuploads%2F4zu9hRTkO0WIsH64vrDr%2Fauto_scatter_example.jpg?alt=media&amp;token=e55bb84a-0606-48b8-88d3-5efe7ee15ce4">auto_scatter_example.jpg</a></td></tr></tbody></table>

## Auto Scatter

When 2 numeric columns exist

```sql
-- @title: Auto Scatter - Sales by Profit
-- @subtitle: Auto generted scatter chart
SELECT 
  Profit,
  Amount
FROM Sales
WHERE Status = 'Won';
```

<figure><img src="https://4045370218-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB0xzzR5x0BnQ6kHixlzd%2Fuploads%2F4zu9hRTkO0WIsH64vrDr%2Fauto_scatter_example.jpg?alt=media&amp;token=e55bb84a-0606-48b8-88d3-5efe7ee15ce4" alt=""><figcaption><p>An example scatter chart</p></figcaption></figure>

| PROFIT  | AMOUNT   |
| ------- | -------- |
| 27064.0 | 84572.0  |
| 45307.0 | 133253.0 |
| 14746.0 | 73728.0  |
| 21198.0 | 75705.0  |
| 37394.0 | 196808.0 |
| 15454.0 | 67191.0  |
| 13263.0 | 78013.0  |
| 11532.0 | 76878.0  |
| 13092.0 | 72732.0  |
| 25484.0 | 63708.0  |

##
