library(figpatch)
library(ggplot2)
# Attach the fig image file
image <- system.file("extdata", "fig.png", package = "figpatch", mustWork = TRUE)
# Read in the image as a 'fig'
img <- fig(image)
# add the fig label
fig_lab(
img,
lab = "Below you will find a fig!",
pos = "top",
size = 20
)
Run the code above in your browser using DataLab