gg_twitter: Quickly Format and Save a ggplot Object for Posting to...

Description Usage Arguments

View source: R/gg_twitter.R

Description

Optionally resizes title and axis labels and saves a 600 dpi png 5 inches tall and ~8.9 inches wide via ggsave. Values are adjustable.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
gg_twitter(
  filename = paste("fig1-", Sys.Date(), ".png", sep = ""),
  path = getwd(),
  plot = last_plot(),
  resize_labels = TRUE,
  title_size = 16,
  axistitle_size = 13,
  axistext_size = 9,
  height = 5,
  width = height/0.5625,
  dpi = 600
)

Arguments

filename

Character string

path

Character string

plot

ggplot object

resize_labels

Logical value

title_size

Numeric value

axistitle_size

Numeric value

axistext_size

Numeric value

height

Numeric value

width

Numeric value

dpi

Numeric value


vandomed/dvmisc documentation built on Oct. 2, 2020, 9:50 p.m.