make_barplot: Barplot

View source: R/make_barplot.R

make_barplotR Documentation

Barplot

Description

Generate and style a bar plot which visualises summary statistics (mean, sum, count) of values in a group. Designed to be used in a Shiny application to visualise results of group_by and summarise operations.

Usage

make_barplot(col_chart_df, x_lab, y_lab, axis_font_size, lab_font_size)

Arguments

col_chart_df

a two column data frame. The first column specifies the groupings. The second column specifies the summary statistic per-group.

x_lab

a single element character vector specifying the X-axis label.

y_lab

a single element character vector specifying the Y-axis label.

axis_font_size

a numeric value specifying the font size for axis tick labels.

lab_font_size

a numeric value specifying the font size for axis labels.

Details

This is a helper function to pass user defined data, aesthetic mappings, and chart styling parameters to ggplot within a Shiny app.

Value

a ggplot object that can be passed to renderPlot to display in a Shiny application.


livelihoods-and-landscapes/maplandscape documentation built on March 20, 2023, 5:43 a.m.