plot_stackedbar: Created stackedbar in kedata style

View source: R/plot_stackedbar.R

plot_stackedbarR Documentation

Created stackedbar in kedata style

Description

Created stackedbar in kedata style

Usage

plot_stackedbar(
  data,
  x,
  y,
  fill,
  title,
  subtitle,
  data_source,
  x_title,
  y_title
)

Arguments

data

data frame

x

colname for x variable

y

colname for y variable

fill

colname for fill

title

character

subtitle

character

data_source

character

x_title

character

y_title

character

Value

ggplot object

Examples

## Not run: 
library(ggplot2)
library(dataplot)
library(tidyr)
library(dplyr)

df1 <- mpg %>%
  count(manufacturer, class)

plot_stackedbar(data = df1,
                x = "manufacturer",
                y = "n",
                fill = "class",
                x_title = "col_x",
                y_title = "col_y",
                title = "Lorem Ipsum is simply dummy text",
                subtitle = "Contrary to popular belief, Lorem Ipsum is not simply random text",
                data_source = "www.kedata.online")

## End(Not run)

eppofahmi/dataplot documentation built on Jan. 22, 2025, 1:14 a.m.