[R-gui] plot.new() within tkrplot, coplot
James Wettenhall
wettenhall at wehi.edu.au
Sat Jun 26 10:25:29 CEST 2004
Hi,
Does anyone know a good way to get rid of warnings like:
Warning message:
calling par(new=) with no plot
when using an R plot function which calls plot.new()
(e.g. coplot) from within tkrplot?
For example:
library(tkrplot)
tt <- tktoplevel()
plotFun <- function() {
data(quakes)
coplot(lat ~ long | depth, data = quakes)
}
img <- tkrplot(tt,fun=plotFun)
Warning message:
calling par(new=) with no plot
tkpack(img)
The plot looks fine in the Tk window, but I'm just
wondering whether I can get rid of the warning message.
On a similar subject, does anyone have any general advice on
whether it is best to pass main="Plot Title" directly to the
plot function or whether it is best to use title() for ploting
within tkrplot? Or doesn't it matter? I'm having trouble
finding a reproducible example now, but I have experienced
errors like:
"Cannot set parameter main in high-level plot function",
and I wonder whether these errors are related to using tkrplot
and R2HTML's HTMLplot, rather than the regular R graphics device.
Regards,
James
More information about the R-SIG-GUI
mailing list