search for: printcoords

Displaying 1 result from an estimated 1 matches for "printcoords".

2008 Nov 07
1
determining plot location in lattice
Hi, I'm dealing with a lattice plot inserted into a tk widget and would like to know when a user has clicked on the plot area of a plot (i.e. inside the axes). For example, library(tkrplot) library(lattice) tt <- tktoplevel() makePlot <- function() print(xyplot(1 ~ 1)) printCoords <- function(x, y) print(c(x, y)) img <- tkrplot(tt, makePlot) tkbind(img, "<1>", printCoords) tkpack(img) I would like to know when a user clicks inside the axes, but don't know how to determine where the plot region is. Essentially, this comes down to answering the fol...