---
title: "Histogram with density curve in Vista | Oplema"
description: "Add a smoothed density curve (KDE) to a histogram in Vista, to see the shape of a numeric distribution without its bin edges."
url: "https://oplema.com/docs/vista/distribution/histogram-with-density-curve"
updated: "2026-11-04"
---

# Histogram with density curve

Histogram with density curve draws the usual binned columns and adds a smoothed estimate on top, so you can see the overall shape without being misled by where the bins fall.

## Add a curve to customer wait times

The same twenty waits keep their one-minute columns and gain a smooth curve on top, which shows one peak around 4 to 5 minutes.

Result
| Wait minutes |
| --- |
| 1 |
| 2 |
| 2 |
| 3 |
| 3 |
| 3 |
| 4 |
| 4 |

1. In the Data tab, change Bin width. The columns change while the curve keeps its shape.
2. Open the Design tab and expand Density curve to change how the curve is drawn.
3. Open the dropdown at the top of Properties. It shows `Histogram with density curve`. Choose `Histogram` to remove the curve.

## When to use

Use Histogram with density curve to judge whether data has one peak or two without relying on a single choice of bin edges. If readers only need the counts, plain Histogram is simpler. The curve needs numeric values.

## Inputs

1 port

**Table**

Accepts: Tables.

Accepts one connection on this port.

## Settings

The density curve requires numeric values.

**Variable**

Column whose distribution is shown. Numbers are grouped into bins, and other columns count rows per value. Auto picks one with varied values.

**Frequency**

Rows per bin, or each series as a percent of its total.

Default: `Count`

Options: Count, Percent.

**Bins**

How numbers are grouped into bins. Percent compares each series within the bins shown.

Default: `Auto`

Options: Auto, Fixed width, Fixed count.

**Bin width**

Width of each bin, in the column's units.

Default: `10`

**Group dates by**

How dates in this field are grouped, such as by day, month or year.

Default: `Day`

Options: Exact, Second, Minute, Hour, Day, Week, Month, Quarter, Year, Month of year, Day of week, Hour of day.

**Split by**

Optional column that splits the distribution into overlaid series. Each different value is its own series, and NULL and empty values are kept apart.

49 more settings

**Sort by**

Default keeps categories in source order, and bins and dates in ascending order. Sorting by frequency applies to categories.

Default: `Default`

Options: Default, Variable, Frequency.

**Period size**

Number of units in each period. Hours, minutes and seconds count fixed intervals from 1970-01-01 in the chart's time zone. Calendar periods follow local boundaries.

Default: `1`

**Missing periods**

Missing periods

Default: `Leave empty`

Options: Omit, Leave empty, Fill with zero.

**Current partial period**

Keeps or leaves out the current period, which hasn't finished yet.

Default: `Include`

Options: Include, Exclude.

**Source timezone**

IANA time zone for timestamps without an offset, such as Europe/Copenhagen. Ambiguous local times need an explicit offset.

Default: `UTC`

**Chart timezone**

IANA time zone used for grouping and display. Vista filters keep their own time zone.

Default: `UTC`

**Week starts**

Day the week starts on.

Default: `Monday`

Options: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday.

**Fiscal year starts**

Month the fiscal year starts in. Sets quarter and year boundaries.

Default: `January`

Options: January, February, March, April, May, June, July, August, September, October, November, December.

**Bin window**

Shows only the bins within a range you set.

Default: `Auto`

Options: Auto, Min only, Max only, Min & max.

**Title**

Title shown inside the chart. Leave empty to hide it.

**Title color**

Color of the title.

**Title size (Advanced title)**

Size of the title, in pixels.

Default: `24`

**Title alignment (plot)**

Alignment of the title.

Default: `Left`

Options: Left, Center, Right.

**Bar width**

Bar thickness as a percent of the space for each category. At 100, bars touch.

Default: `80`

**KDE line style**

How the line joins the points. The density curve is available when the values are numbers that can be binned.

Default: `Smooth`

Options: Linear, Smooth, Step (before), Step (middle), Step (after).

**KDE points**

Marker drawn at each point on the line.

Default: `None`

Options: Circle, Hollow circle, Cross, Diamond, Square, Triangle, None.

**Title (Horizontal axis)**

Title of the X axis. Leave empty to use the field names.

**Date labels**

How dates are written in the chart labels.

Default: `Auto`

Options: Auto, Iso, Date, Datetime, Custom.

**Tooltip dates**

How dates are written in tooltips.

Default: `Iso`

Options: Auto, Iso, Date, Datetime, Custom.

**Label size (Advanced horizontal axis)**

Size of the X axis labels, in pixels.

Default: `12`

**Label angle (Advanced horizontal axis)**

Angle of the X axis labels. Auto turns them when they don't fit.

Default: `Auto`

Options: Auto, 0°, 45°, 90°.

**Title size (Advanced horizontal axis)**

Size of the X axis title, in pixels.

Default: `12`

**Title distance (Advanced horizontal axis)**

Extra space between the X axis labels and the title, in pixels.

Default: `4`

**Title (Vertical axis)**

Title of the Y axis. Leave empty to use the field names.

**Range**

Sets fixed limits for the value axis.

Default: `Auto`

Options: Auto, Min only, Max only, Min & max.

**Display units**

Unit for value labels. Every tick is divided by it.

Default: `None`

Options: None, Thousands (K), Millions (M), Billions (B).

**Prefix**

Text before each value label.

**Suffix**

Text after each value label.

**Decimal places**

Most decimal places shown on value-axis labels and in tooltips.

Default: `2`

**Always show decimal places**

Pads values to the decimal places, so with 2, 2630 shows as 2,630.00.

Default: `false`

**Thousands separators**

Groups digits, so 2630 shows as 2,630.

Default: `true`

**Label size (Advanced vertical axis)**

Size of the Y axis labels, in pixels.

Default: `12`

**Label angle (Advanced vertical axis)**

Angle of the Y axis labels.

Default: `Auto`

Options: Auto, 0°, 45°, 90°.

**Title size (Advanced vertical axis)**

Size of the Y axis title, in pixels.

Default: `12`

**Title distance (Advanced vertical axis)**

Extra space between the Y axis labels and the title, in pixels.

Default: `4`

**Show tooltip**

Shows or hides values when you hover over a mark.

Default: `true`

**Tooltip**

Text shown when you hover over a mark. Write it in the editor and insert values from Values.

**Values**

Values you can insert into the text. Each row calculates a value from a source field or, in charts, shows a chart value, and can have its own number or date format.

**Background**

Card background color. Auto follows the theme.

**Plot padding**

Space between the card edge and the chart, in pixels.

Default: `0`

**Grid lines**

Shows or hides grid lines.

Default: `false`

**Axis frame**

Shows or hides the axis lines around the plot.

Default: `true`

**Frame sides**

Edges of the plot that get an axis line.

Default: `Bottom & left`

Options: Bottom, Left, Bottom & left, Full box.

**Axis titles**

Shows or hides the titles on both axes.

Default: `true`

**Tick color**

Color of the axis labels.

**Axis title color**

Color of the axis titles. Auto matches the axis labels.

**Frame color**

Color of the axis lines.

**Corner radius (px)**

Corner radius in whole logical pixels.

Default: `0`

**Border width (px)**

Border width in whole logical pixels.

Default: `0`

## Histogram with density curve FAQs

**Does the density curve change when I change the bin width?**

No. The curve is estimated from every observation in its split group, not from the bins, so bin width changes only the columns.

### Chart your data. Build it in Vista.

Vista opens in your browser, with no account.

[Open Vista](https://oplema.com/editor?path=%2F%3Fopen%3Dvista) [About Vista](https://oplema.com/vista)
