The following is code to initialize an Splot object and add three sets of interactive data to figure 1:
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 Boxplots
Set up data
xvec = 1:6
yvec = Splot$plot.output[[1]]$stats[3,]
x.lbls = as.data.frame(matrix(c("boxplot.point1","boxplot.point2","boxplot.point3","boxplot.point4","boxplot.point5","boxplot.point6",
                                                  as.character(yvec),
                                                  "not a link", "not a link", "im a link", "im a link", "not a link", "not a link"),
                                              ncol=3))
names(x.lbls) = c("x.Label.1","x.Label.2", "asLinks")
asLinks = c(NA, NA, "code.html/interactiveFigure1.html", "code.html/interactiveFigure1.html", NA, NA)
x.links = as.data.frame(matrix(rep(NA, 18), nrow=6))
x.links[,1] = "code.html/codeFigure1.html, code.html/initializeObject.html"
x.links[,2] = "code.html/boxplot.interactive.html, code.html/interactiveFigure1.html"
x.links[,3] = "code.html/completeCode.html"
names(x.links) = c("code", "interactive", "completeCode")
Add to object
Splot = makeImap(Splot, figure=1, xy.type="points", x.pos=xvec, y.pos=yvec,
x.labels = x.lbls, asLinks = asLinks,
                              
fname.root="sendPlotEx", spot.radius=25)
Adding Information to one of the outlier points
Set up data
x.links = as.data.frame(matrix(rep(NA, 3), nrow=1))
x.links[,1] = "code.html/codeFigure1.html, code.html/initializeObject.html"
x.links[,2] = "code.html/point.interactive.html, code.html/interactiveFigure1.html"
x.links[,3] = "code.html/completeCode.html"
names(x.links) = c("code", "interactive", "completeCode")
Add to object
Splot = makeImap(Splot, figure=1, xy.type="circle", x.pos=3, y.pos=7,
                              
x.labels = list(Xlabel1.xyType="point", Xlabel2.asLinks="im a link"),
                               y.labels = list(ylabel1.yValue="7", tooltip.font="arial",tooltip.size="20",
                                                      tooltip.fontcolor="hotpink",tooltip.background="blue"),
                               asLinks = "code.html/interactiveFigure1.html",
fname.root="sendPlotEx", spot.radius=20, x.links=x.links,
                              
font.type="arial", font.size="20", font.color="hotpink", bg.color="blue")
Adding Information to two rectangles
Set up data
x.links = as.data.frame(matrix(rep(NA, 6), nrow=2))
x.links[,1] = "code.html/codeFigure1.html, code.html/initializeObject.html"
x.links[,2] = "code.html/rectangle.interactive.html, code.html/interactiveFigure1.html"
x.links[,3] = "code.html/completeCodeFigure1.html, code.html/completeCode.html"
names(x.links) = c("code", "interactive", "completeCode")
Add to object
Splot = makeImap(Splot, figure=1, xy.type="rect",
                               x.pos=c(3,1), y.pos=c(25,5),x.right.pos=c(4,2), y.bottom.pos=c(20,0),
                               x.labels = as.data.frame(list(Xlabel.1=c("rect.1","rect.2"),
                                                                           Xlabel.2.coordinates=c("3,20-3,25-4,25-4,20","1,0-1,5-2,5-2,0"),
                                                                           asLinks=c("im a link", "im a link"))),
                               y.labels = list(tooltip.size=c("8","8"), tooltip.fontcolor=c("cyan","cyan"), tooltip.background=c("black","black")),
                               asLinks = "http://www.buffalo.edu", fname.root="sendPlotEx", spot.radius=10, x.links=x.links,
                               font.size=8, font.color="cyan", bg.color="black")