library(ggplot2)
library(png)
library(raster)
library(grid)
library(magick)
img<-readPNG("ggPleaseExplain/pauline.png")
g <- rasterGrob(img, interpolate=TRUE)
p + annotation_custom(g, xmin=2.5, xmax=6.3, ymin=6, ymax=8 ) +
geom_point() + geom_abline(colour = "red")
d <- data.frame('values' = c(1,2,3,4,5,5,5,6,6,6,7,7,7,7,4,3,3,3,5,5,5,5,5,5,6,6,6,10,8,40,43))
ggplot(d,aes("values",values)) + geom_boxplot() + annotation_custom(g, ymin=30, ymax=40 )
# unfinished function for boxplot
PleaseExplainBoxplot <- function(ymin, ymax){
img <- image_read('https://github.com/JamesKondilios/ggPleaseExplain/blob/master/pauline.png')
img <- rasterGrob(img, interpolate=TRUE)
}
# Expanding ggplot
# https://cran.r-project.org/web/packages/ggplot2/vignettes/extending-ggplot2.html
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.