Description Usage Arguments Value Examples
Nice histogram
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
data |
A dataset |
x |
horizontal axis variable |
color, fill |
Character. Variables to group on. With changing fill or border color |
alpha |
Opacity of fill color |
binwidth |
Numeric. Width of bins |
xlims, ylims |
Numeric vectors of 2 elements. Axis limits |
title |
Plot title |
xlab, ylab |
Axis labels. Ylab default: "density" |
fillname, colorname |
Optional variable names for groups to be displayed on legend |
filllabels, colorlabels |
Optional labels for grouos to be displayed on legend |
legendpos |
Legend position. Options: “left”,“top”, “right” (default), “bottom” |
A ggplot2-plot
1 | niceHistogram(ggplot2::mpg, "displ", binwidth = 0.3, color = "class", fill = "class")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.