# NOT RUN {
if(interactive()){
p <- l_plot(iris[,1:2], color=iris$Species)
printEntered <- function(W) {
cat(paste('Entered point ', l_currentindex(W), '\n'))
}
printLeave <- function(W) {
cat(paste('Left point ', l_currentindex(W), '\n'))
}
l_bind_item(p, tags='model&&point', event='<Enter>',
callback=function(W) {printEntered(W)})
l_bind_item(p, tags='model&&point', event='<Leave>',
callback=function(W) {printLeave(W)})
}
# }
Run the code above in your browser using DataLab