sticker: sticker

Description Usage Arguments Value Author(s) Examples

View source: R/sticker.R

Description

create sticker in R

Usage

1
2
3
4
5
6
7
8
sticker(subplot, s_x = 0.8, s_y = 0.75, s_width = 0.4,
  s_height = 0.5, package, p_x = 1, p_y = 1.4, p_color = "#FFFFFF",
  p_family = "Aller_Rg", p_size = 8, h_size = 1.2,
  h_fill = "#1881C2", h_color = "#87B13F", spotlight = FALSE,
  l_x = 1, l_y = 0.5, l_width = 3, l_height = 3, l_alpha = 0.4,
  url = "", u_x = 1, u_y = 0.08, u_color = "black",
  u_family = "Aller_Rg", u_size = 1.5, filename = paste0(package,
  ".png"), dpi = 300)

Arguments

subplot

subplot

s_x

x position for subplot

s_y

y position for subplot

s_width

width for subplot

s_height

height for subplot

package

package name

p_x

x position for package name

p_y

y position for package name

p_color

color for package name

p_family

font family for package name

p_size

font size for package name

h_size

size for hexagon border

h_fill

color to fill hexagon

h_color

color for hexagon border

spotlight

whether add spotlight

l_x

x position for spotlight

l_y

y position for spotlight

l_width

width for spotlight

l_height

height for spotlight

l_alpha

maximum alpha for spotlight

url

url at lower border

u_x

x position for url

u_y

y position for url

u_color

color for url

u_family

font family for url

u_size

text size for url

filename

filename to save sticker

dpi

plot resolution

Value

gg object

Author(s)

guangchuang yu

Examples

1
2
3
4
library(ggplot2)
p <- ggplot(aes(x = mpg, y = wt), data = mtcars) + geom_point()
p <- p + theme_void() + theme_transparent()
sticker(p, package="hexSticker")

hexSticker documentation built on Jan. 10, 2019, 5:04 p.m.