plot_mrg: Marginal plot on scatter plot

View source: R/plot_mrg.R

plot_mrgR Documentation

Marginal plot on scatter plot

Description

Membuat marginal plot untuk menunjukkan distribusi variabel dalam scatter plot

Usage

plot_mrg(
  data,
  x,
  y,
  title,
  subtitle,
  data_source,
  mg_type = c("histogram", "boxplot", "density")
)

Arguments

data

data frame

x

character of column name for x axis

y

character of column name for y axis

title

character for plot title

subtitle

character for plot subtitle

data_source

character for footer text

mg_type

type of marginal plot

Value

ggplot ggarrange object

Examples

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

p1 <- plot_mrg(
  data = economics, x = "psavert", y = "uempmed",
  title = "Lorem Ipsum is simply dummy text",
  subtitle = "Contrary to popular belief, Lorem Ipsum is not simply random text",
  data_source = "www.kedata.online",
  mg_type = "histogram"
)

p1

## End(Not run)

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