knitr::opts_chunk$set(echo = T, fig.width = 7, fig.height = 5, root.dir=here::here())
knitr::opts_knit$set(root.dir=here::here())
library(hexSticker)

library(dplyr)
library(ggplot2)

You can make awesome hex stickers for your R packages using hexSticker.

img1 <- here::here("inst/hex/buff_kirby.png") 
# img2 <- magick::image_transparent( magick::image_read(img1), color = "white")
# magick::image_write(img2,path = here::here("inst/hex/buff_kirby_nobg.png") )

scKirby

Original image credit

s_size <- .65
hex <- hexSticker::sticker(subplot = img1, 
                    package="scKirby", p_color="#faca11", p_size=20, p_y = 1.65,
                    s_x = 1, s_y = .88,  s_width = s_size, s_height = s_size*.75, 
                    h_fill ="#3fb9ef", h_color = "#ef66aa", h_size = 3,
                    spotlight = TRUE,l_y = 1.5, l_x=.8, l_width = 2,
                    filename = here::here("inst/hex/hex.png"))
print(hex)

Session Info

utils::sessionInfo()



bschilder/scKirby documentation built on April 22, 2024, 12:13 a.m.