![]() |
VOOZH | about |
A histogram contains a rectangular area to display the statistical information which is proportional to the frequency of a variable and its width in successive numerical intervals. A graphical representation that manages a group of data points into different specified ranges. It has a special feature that shows no gaps between the bars and is similar to a vertical bar graph.
We can create histograms in R Programming Language using the hist() function.
Syntax:
hist(v, main, xlab, xlim, ylim, breaks, col, border)
Parameters:
Creating a simple histogram chart by using the above parameter. This vector v is plot using hist().
Example:
Output:
To describe the range of values we need to do the following steps:
Example
Output:
To create a histogram return value chart.
Output:
Creating different width histogram charts, by using the above parameters, we created a histogram using non-uniform width.
Example
Output: