Function adapted from from Marc in the box to add a png picture to a plot. Original function in: https://stackoverflow.com/questions/27800307/adding-a-picture-to-plot-in-r
1 |
obj |
an image file imported as an array (e.g. png::readPNG, jpeg::readJPEG) |
x |
mid x coordinate for image |
y |
mid y coordinate for image |
width |
width of image (in x coordinate units) |
interpolate |
Logical. Passed to graphics::rasterImage. Indicates whether to apply linear interpolation to the image when drawing. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.