Related Articles
Histogram Bins
Histogram bins What they are To understand the bins of a histogram, we must first understand a histogram. A histogram is a distribution of a quantitative, and often continuous, variable. A histogram divides the observations of the variable into ...
gf_density()
The gf_density() function will overlay a density plot onto a density histogram (i.e., gf_dhistogram(), not gf_histogram()). The density plot is a smoothed out version of the distribution. They can be helpful when you want to get a better idea of the ...
gf_vline()
The gf_vline() function will add a vertical line onto a plot. You can plot the line by referencing a value in a data frame (Example 1), or by specifying the point along the axis where the line should run through (Example 2). Example 1: # Save the ...
gf_dhistogram()
The gf_dhistogram() function is very similar to the gf_histogram() function, however, the difference is that gf_dhistogram() will create a density histogram for a quantitative variable. This means it will show the percentage of cases for each value ...
gf_labs()
The gf_labs() function can be used to modify the labels of your plots. You can add a title for your plot, or modify the label for the x- or y-axis. Example: # Add a title and change the label for the x-axis gf_histogram(~Thumb, data = Fingers) %>% ...