How to draw density Diagram with R language
This article mainly introduces the relevant knowledge of how to draw a density map in R language, the content is detailed and easy to understand, the operation is simple and fast, and has a certain reference value. I believe you will gain something after reading this article on how to draw a density map in R language. let's take a look.
The density map is a smooth version of the histogram, which is used to calculate and draw the kernel density estimation of the data, which can better define the shape of the distribution. Use the geom_density function to draw a density map.
Draw a density map
The usage data are as follows:
Set.seed (1234) df