Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setGraphicsDelay

Set a one-time slowdown on opening standard graphics


Description

This function is mainly for internal use, to work around a bug in macOS Catalina: if base plotting happens too quickly after opening RGL and the first call to quartz, R crashes.

This inserts a delay after the first call to open the graphics device. The default is no delay, unless on Catalina with no graphics device currently open but the quartz device set as the default, when a 1 second delay will be added. Use environment variable "RGL_SLOW_DEV = value" to set a different default delay.

It works by changing the value of options("device"), so explicit calls to the device will not be affected.

It is called automatically when the rgl package is loaded.

Usage

setGraphicsDelay(delay = Sys.getenv("RGL_SLOW_DEV", 0), 
                 unixos = "none")

Arguments

delay

Number of seconds for the delay.

unixos

The name of the Unix OS. If set to "Darwin", and the version is 19.0.0 or greater, the default delay is changed to 1 second.

Value

Called for the side effect of adding the delay to the first opening of the graphics device.


rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.