Takes an already built ggplot and add text to the right of the main plot, or as a legend underneath.
1 2 3 | BeNiceAnotateThatPlot(dataPlot, anotation = "", anotationType = "right",
titleAnotation = NULL, titlePlot = NULL, plotIt = T,
fontFamily = "Calibri", ...)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Dummy data generation
x = runif(9, 0, 125)
data = as.data.frame(x)
data$y = runif(9, 0, 125)
# Dummy plot generation
superPlot = ggplot(data, aes(x, y)) +
geom_point()
# Anotate that dummy plot
annotedPlot = BeNiceAnotateThatPlot(superPlot, anotation = "The beach is pretty nice\nIsn't it ?", titleAnotation = "Title", titlePlot = "Super Nice Title")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.