--- title: "Density plots" slug: "density-plots" updated: 2026-09-04T09:40:13Z published: 2026-09-04T09:40:13Z canonical: "userguide.dataclassroom.com/density-plots" --- > ## Documentation Index > Fetch the complete documentation index at: https://userguide.dataclassroom.com/llms.txt > Use this file to discover all available pages before exploring further. # Density plots A density plot shows a curve indicating how densely data points are distributed along an axis. It can be an alternative to a histogram or a [violin plot](/v1/docs/violin-plots). These two plots are made with the same raw data (distribution of cicadas with altitude, see [example dataset here](https://dataclassroom.com/en/dataseteditor/a8bcc898-3c3a-43d3-af77-b925612c88c2)): ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782985495715.png) ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782985409479.png) To display the density curve instead of the histogram, click **Show density curve:** **![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782985581877.png)** ### Multiple curves (by group) If you had a Z axis on your histogram that had grouped and colored the data, the same will be carried over to the density plot. Here are the same cicadas, showing how their head width (size) is grouped by species. (see [example dataset here](https://dataclassroom.com/en/dataseteditor/a71a8904-13c3-4c0b-a3e2-18238df875b4)): ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782985815155.png) ### Ridgeline plot By default, all curves are drawn on top of each other and are semi-transparent. Clicking the **Configure** (gear icon) allows you to displace the curves so they show as a series of "ridges": ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782985918484.png) You can also adjust the ridge offsets, so they are partially overlaid, and adjust the opacity for a different look: ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782986001671.png) ### Configuration of the curves There are number of other options you can play with, depending on your data and how you want to present it. ![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1782986300133.png) Note: the **color** setting only takes effect when you don't have groups. Otherwise, the per-group color (set in the categorical variable's Values configuration) takes precedence. **Line** and **fill** control whether the outline and/or the filled are a shown. **Smoothing** affects how smooth the curve looks, and is similar to playing with the histogram's number of bins. **Trim to data** removes the "tails" on the left and right, and stops the plot exactly where the last actual data points are on each side. **Group scaling** affects the relative heights of the curves when there are groups. **Equal area** is usually the best choice when the values for each data point are directly comparable, but **equal width** can be used when you want them all to have the same maximum height.