powered by
Create a histogram plot from a data frame through ggplotly
make_histogram( dt, value, groups = NULL, binwidth = NULL, bins = NULL, scales = "fixed", ggtheme = "minimal", x_axis_label = NULL, plot_palette = NULL, plot_palette_generator = "plasma" )
data.frame containing the data to plot.
Name of the column to use as values on the y axis of the plot.
Name of the column containing the different groups.
Width of the histogram bins.
Number of bins. Overridden by binwidth. Defaults to 30.
From ggplot2::facet_wrap: Should scales be 'fixed', 'free', or free in one dimension ('free_x', 'free_y'). Default is 'fixed'.
ggplot2 theme function to apply. Default is ggplot2::theme_minimal.
Label for the x axis.
Character vector of hex codes specifying the colors to use on the plot.
Palette from the viridis package used in case plot_palette is unspecified or insufficient for the number of colors required.
A plotly-ized version of a grouped ggplot histogram plot.
# NOT RUN { make_histogram(dt = iris, value = 'Sepal.Length', groups = 'Species') # }
Run the code above in your browser using DataLab