Skip to content

Instantly share code, notes, and snippets.

@erictleung
Created June 13, 2022 16:57
Show Gist options
  • Save erictleung/45924999e1c8d52142099c5faed8e2b7 to your computer and use it in GitHub Desktop.
Save erictleung/45924999e1c8d52142099c5faed8e2b7 to your computer and use it in GitHub Desktop.
Quick logo for Big Book of R
# Make logo
library(hexSticker)
library(showtext)
# Add Google Font
font_add_google(name = "Open Sans", family = "Open Sans")
showtext_auto() # Use this font in all rendering
# Picture of book that was quickly screenshot
imgurl <- "~/Downloads/Screenshot 2022-06-13 092720.png"
sticker(
imgurl,
# Package settings
package = "BigBookOfR",
p_size = 19,
p_y = 1.35,
p_color = "#000000",
p_family = "Open Sans",
p_fontface = "bold",
# Hexagon settings
h_fill = "#EC4A81",
h_color = "#000000",
# Subplot or image settings
s_x = 1,
s_y = 0.75,
s_width = 0.5,
filename = "~/Downloads/big-book-r-logo.png"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment