File: aaa.R

package info (click to toggle)
r-cran-plot3d 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,588 kB
  • sloc: makefile: 2
file content (31 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## ====================================================================
## A local environment for non user-visible data,
## ====================================================================

.plot3D <- new.env()

.plot3D$plist <- list()

.plot3D$refresh <- TRUE

refresh <- function(set = TRUE)     # internal function...
  .plot3D$refresh <- set
  
getplist <- function()
  .plot3D$plist

setplist <- function(plist)
  .plot3D$plist <- plist

initplist <- function(add) {
  if (add) 
    plist <- getplist()
  else
    plist <- NULL
# test for setting the correct plt parameters:
  if (!add & .plot3D$refresh) {
    plot.new()
    par(new = TRUE)
  }  
  plist
}