[R] HowTo get callback on destroy of grDevices::windows()

2010-07-26 Thread rrich...@fh-lausitz.de
 I'm build with the usage of the tcltk/tcltk2 package a gui which is 
started with rscript.exe. At this gui the user is able to open and close 
plot windows.


Now I'm looking for a way that a r function is called when a 
grDevices::windows window is closed.
Is there a way to attach a callback function or so, which would be 
triggert if the user click at close of the grDevices::window?


My workarround is to check continues the open windows with the tcl 
command after, but it's no good workarround.


thanks
roland

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] HowTo get callback on destroy of grDevices::windows()

2010-07-26 Thread rrich...@fh-lausitz.de

 okay, thanks I will try the R-devel list :)

BR
Roland

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] rgl package don't draw points with a color over points with another color

2010-07-27 Thread rrich...@fh-lausitz.de
 I want to plot points with different colors to show different 
selections of points in a 3d plot.


My problem is that if I plot a red point at a location where already a 
blue point was plotted, than the point is still blue.

Is there a parameter or so which can be used to draw over a existing point?

Example:
> require(rgl)
> open3d()
> plot3d(a<-c(1,2,3,4,5),a,a,type="l", col="blue")# draw line
> plot3d(a<-c(1,2,3,4,5),a,a,type="p",col="blue",add=TRUE)# mark 
points at the line
> plot3d(a<-c(3),a,a,col="red",type="p",add=TRUE)# mark a point 
with another color


thanks
roland

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.