emptyPlot: Empty ggplot with text label

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Empty ggplot with text label

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
emptyPlot(
  title,
  chartType = "regular",
  textLabel,
  textSize = 14,
  subtitleOne = "",
  subtitleTwo = "",
  logo = NULL,
  border = TRUE
)

Arguments

title

plot title

chartType

chart type. default value is "regular". regular includes line and bar charts. other values are "pie"

textLabel

text label for the center of the plot

textSize

font size of the annotation. default value is 14px

subtitleOne

optional subtitle

subtitleTwo

optional subtitle under first subtitle

logo

optional watermark image

border

optional. adds a border to the plot, default value is TRUE

Value

ggplot object

Examples

1
2
3
4
5
6
7
emptyPlot(
  "Title", textLabel = "No data to display", subtitleOne = "SubtitleOne",
  subtitleTwo = "SubtitleTwo", logo = magick::logo
)
emptyPlot(
  "Pie Chart", "pie", "bad pie", 16, "subtitle", "another subtitle", magick::logo, FALSE
)

andrew-a-hale/initmediaRUtils documentation built on Aug. 25, 2020, 2:51 p.m.