Like the histogram shown below:
(source: cern.ch)
You can also make histograms by using ggplot2 , “a plotting system for R, based on the grammar of graphics” that was created by Hadley Wickham. This post will focus on making a Histogram With ggplot2.
To construct a histogram, the data is split into intervals called bins. The intervals may or may not be equal sized. For each bin, the number of data points that fall into it are counted (frequency). The Y axis of the histogram represents the frequency and the X axis represents the variable.
Maybe with geom_step
library('ggplot2')
set.seed(1)
x <- unlist(Map(rpois, 20, 4:1 * 5))
qplot(seq_along(x), x, geom = 'step')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With