This is an R HTML document. When you click the chunk like this:
Bar graph with plotted margin and backgroundlibrary(tidyverse)
library(ggplot2) ggplot(mtcars, aes(x=cyl)) + geom_bar(fill="tomato") + theme(plot.background=element_rect(fill="steelblue"), plot.margin = unit(c(2, 4, 1, 3), "cm")) # top, right, bottom, left
library(tidyverse) library(ggplot2) library(grid) my_grob = grobTree(textGrob(x=0.1, y=0.9, hjust=0, "This text is at x=0.1 and y=0.9, relative!\n Anchor point is at 0,0", gp=gpar(col="firebrick", fontsize = 8, fontface="bold"))) ggplot(mtcars, aes(x=cyl)) + geom_bar() + annotation_custom(my_grob) + labs(title="Annotation Example")