> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/user/cohort-browser/chart-types/scatter-plot.md). Agents can also search and read this documentation through its [MCP server](https://documentation.dnanexus.com/~gitbook/mcp).

# Scatter Plot

Learn to build and use scatter plots in the Cohort Browser.

{% hint style="info" %}
An Apollo license is required to use Cohort Browser on the DNAnexus Platform. Org approval may also be required. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## When to Use Scatter Plots

Scatter plots can be used to visualize the relationship between two numerical fields. Each point represents a particular combination of values - one from each field - found in one or more records in a cohort.

Primary field values are plotted on the *x* axis. Secondary field values are plotted on the *y* axis.

| Supported Data Types                     |                                          |
| ---------------------------------------- | ---------------------------------------- |
| Primary Field                            | Secondary Field                          |
| Numerical (Integer) or Numerical (Float) | Numerical (Integer) or Numerical (Float) |

## Using Scatter Plots in the Cohort Browser

In the scatter plot below, each dot represents a particular combination of values, found in one or more records in a cohort, in the fields *Insurance Billed* and *Cost.* The lighter the dot at a particular point, the fewer the records that share that combination. Darker dots, meanwhile, indicate that more records share a particular combination.

![Scatter Plot: Insurance Billed x Cost](https://3410363935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1s2UHuAFgrsxnijuHMc%2Fuploads%2Fgit-blob-f45c39084687a3b57bea3a5438e98268706adaba%2Fscatter-plot-example.png?alt=media)

### Non-Numeric Data in Scatter Plots

Fields containing primarily numeric data may also include non-numeric values. These non-numeric values cannot be represented in a scatter plot. The message "This field contains non-numeric values" appears below the scatter plot, as in this sample chart:

![Scatter Plot Based on Field or Fields Containing Non-Numeric Values](https://3410363935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1s2UHuAFgrsxnijuHMc%2Fuploads%2Fgit-blob-62c1e12585ca584f4dcc49867633ede619440b21%2Fscatter-plot-non-numeric-values.png?alt=media)

Clicking the "non-numeric values" link displays detail on those values, and the number of records in which each appears.

![Detail on Non-Numeric Values](https://3410363935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1s2UHuAFgrsxnijuHMc%2Fuploads%2Fgit-blob-23c031c3d7c2730837c060d8a822a4f70180bcc2%2Fscatter-plot-non-numeric-value-detail.png?alt=media)

### Limit on Number of Data Points

In the Cohort Browser, scatter plots can display up to 30,000 distinct data points. If you create a scatter plot that requires more data points to be shown, you see this message in the chart area:

![Scatter Plot with Warning Message about Data Point Limit](https://3410363935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FS1s2UHuAFgrsxnijuHMc%2Fuploads%2Fgit-blob-98b146f206ca5a491f12a6d9567c6c1f770d1387%2Fscatter-plot-data-point-limit.png?alt=media)

In this scenario, [add a cohort filter](https://documentation.dnanexus.com/user/cohort-browser/defining-cohorts.md#defining-cohort-criteria) to generate a scatter plot that shows data for all the members of a cohort.

### Cohort Compare

Scatter plots are not supported in Cohort Compare.

## Preparing Data for Visualization in Scatter Plots

When [ingesting data using Data Model Loader](https://documentation.dnanexus.com/developer/ingesting-data/data-model-loader/ingestion-data-types.md), the following data types can be visualized in scatter plots:

* Integer
* Integer Sparse
* Float
* Float Sparse


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.dnanexus.com/user/cohort-browser/chart-types/scatter-plot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
