The following is code to initialize an Splot object and add interactive data to figure 3:
Load Library
library(sendplot)
Set up data
mat = matrix(c(rep(c(rep(4,8),rep(0,5)),2),
                         rep(c(rep(1,8),rep(3,5)),6),
                         rep(c(rep(2,8),rep(3,5)),4)),
                         byrow=T, ncol=13)
mai.mat = matrix(.5,ncol=4,nrow=4)
myX = c(-1,-10,1,10,-5,0)
plot.calls = c("boxplot(count ~ spray, data = InsectSprays, col = 'lightgray')",
                      "plot(1:3,1:3, col='blue', xlab='', ylab=''); points(1:2, 2:3, col='red')",
                      "image(1:2,1:3, z=matrix(myX,ncol=3,nrow=2), xlab='', ylab='')",
                      "plot(cos, xlim = c(-pi,3*pi), n = 1001, col = 'blue', xlab='', ylab='')" )
plt.extras = list(figure1= "rect(xleft=c(3,1), ytop=c(25,5),xright=c(4,2), ybottom=c(20,0));title(main='A', cex=3)",
                        figure2="polygon(x=c(2,2.5,3,2.5), y=c(1,2.5,1,1.5));title(main='B', cex=3)",
                        figure3 ="title(main='C', cex=3)",
                        figure4="title(main='D', cex=3)")
Initialize Splot Object
Splot = initSplot(mat, plot.calls, mai.mat = mai.mat,plot.extras =plt.extras)
Adding information to image
Set up data
x.lbls=as.data.frame(list(xLabels.xy.type= c("image.box", "image.box"),
xLabels.1 = c("X.1", "X.2")))
y.lbls=as.data.frame(list(y.Lables = c("Y.1", "Y.2", "Y.3")))
xy.lbls=list(XY.label = matrix(c("image.box1","image.box2", "image.box3","image.box4","image.box5","image.box6"),ncol=2))
x.links=as.data.frame(list(X.links.1 = c("http://www.buffalo.edu, http://bioinformatics.buffalo.edu", NA)))
y.links=as.data.frame(list(Y.links.1 = c(NA, "http//www.buffalo.edu", NA)))
xy.links=list(XY.link.code = matrix(rep("code.html/codeFigure3.html, code.html/initializeObject.html",6), ncol=2),
                    
XY.link.interactive = matrix(rep("code.html/image.interactive.html, code.html/interactiveFigure3.html",6), ncol=2),
                    
XY.link.completeCode = matrix(rep("code.html/completeCodeFigure3.html, code.html/completeCode.html",6), ncol=2))
Add to object
Splot = makeImap(Splot, figure=3, xy.type="image.box", x.pos= c(.5,1.5,2.5), y.pos=c(.5,1.5,2.5,3.5),
                             
x.labels = x.lbls, y.labels = y.lbls, xy.labels=xy.lbls,
                             
x.links=x.links, y.links=y.links, xy.links=xy.links,
                             
fname.root="sendPlotEx", bb.cex=5, spot.radius=10)