I have a small network generated from the igraph
package and I would like to plot this with an image in the background.
I used this document to find how to overlay an image over a graph:
library('png')
img.3 =readPNG("D:/R_Files/tiger.png")
plot(net2, vertex.shape="raster", vertex.label=NA,
vertex.size=16, vertex.size2=16, edge.width=2)
rasterImage(img.3, xleft=0, xright=1.9, ybottom=0, ytop=1.5)
But this code snippet causes the image to hide the network plot, and I would like the network to be over the image, therefore acting as a background to the network. I haven't been able to find a way to do this - any ideas how or where to look for an answer?